local development configs

pull/349/head
Sigma9 1 year ago
parent b5531aa5f0
commit 9ef9eb2560

@ -8,8 +8,8 @@ RUN fontforge -lang=py -c 'font1 = fontforge.open("FreeSans.ttf"); font2 = fontf
FROM ruby:3.3.3-alpine as webpack FROM ruby:3.3.3-alpine as webpack
ENV RAILS_ENV=production ENV RAILS_ENV=development
ENV NODE_ENV=production ENV NODE_ENV=development
WORKDIR /app WORKDIR /app
@ -34,7 +34,7 @@ RUN echo "gem 'shakapacker'" > Gemfile && ./bin/shakapacker
FROM ruby:3.3.3-alpine as app FROM ruby:3.3.3-alpine as app
ENV RAILS_ENV=production ENV RAILS_ENV=development
ENV BUNDLE_WITHOUT="development:test" ENV BUNDLE_WITHOUT="development:test"
ENV LD_PRELOAD=/lib/libgcompat.so.0 ENV LD_PRELOAD=/lib/libgcompat.so.0
ENV OPENSSL_CONF=/app/openssl_legacy.cnf ENV OPENSSL_CONF=/app/openssl_legacy.cnf

@ -13,7 +13,6 @@ gem 'cancancan'
gem 'csv' gem 'csv'
gem 'devise' gem 'devise'
gem 'devise-two-factor' gem 'devise-two-factor'
gem 'dotenv', require: false
gem 'email_typo' gem 'email_typo'
gem 'faraday' gem 'faraday'
gem 'faraday-follow_redirects' gem 'faraday-follow_redirects'
@ -61,6 +60,7 @@ group :development, :test do
gem 'rubocop-rails', require: false gem 'rubocop-rails', require: false
gem 'rubocop-rspec', require: false gem 'rubocop-rspec', require: false
gem 'simplecov', require: false gem 'simplecov', require: false
gem 'dotenv'
end end
group :development do group :development do

@ -6,6 +6,9 @@ default: &default
development: development:
<<: *default <<: *default
database: docuseal_dev database: docuseal_dev
port: <%= ENV['DATABASE_PORT'] %>
username: <%= ENV['DATABASE_USER'] %>
password: <%= ENV['DATABASE_PASSWORD'] %>
test: test:
<<: *default <<: *default

@ -1,5 +1,4 @@
# frozen_string_literal: true # frozen_string_literal: true
if ENV['RAILS_ENV'] == 'production' if ENV['RAILS_ENV'] == 'production'
if !ENV['AWS_SECRET_MANAGER_ID'].to_s.empty? if !ENV['AWS_SECRET_MANAGER_ID'].to_s.empty?
require 'aws-sdk-secretsmanager' require 'aws-sdk-secretsmanager'

@ -94,7 +94,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_08_16_121641) do
t.string "event_name", null: false t.string "event_name", null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["submitter_id", "event_name"], name: "index_document_generation_events_on_submitter_id_and_event_name", unique: true, where: "((event_name)::text = ANY ((ARRAY['start'::character varying, 'complete'::character varying])::text[]))" t.index ["submitter_id", "event_name"], name: "index_document_generation_events_on_submitter_id_and_event_name", unique: true, where: "((event_name)::text = ANY (ARRAY[('start'::character varying)::text, ('complete'::character varying)::text]))"
t.index ["submitter_id"], name: "index_document_generation_events_on_submitter_id" t.index ["submitter_id"], name: "index_document_generation_events_on_submitter_id"
end end

@ -3,16 +3,27 @@ services:
depends_on: depends_on:
postgres: postgres:
condition: service_healthy condition: service_healthy
build: . redis:
condition: service_started
build:
context: .
dockerfile: Dockerfile
ports: ports:
- 3000:3000 - 3000:3000
volumes: volumes:
- ./docuseal:/data/docuseal - ./docuseal:/data/docuseal
environment: environment:
- HOST=${HOST} - HOST=${HOST}
- FORCE_SSL=${HOST} - FORCE_SSL=${HOST}
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/docuseal - DATABASE_URL=postgresql://postgres:postgres@postgres:5432/docuseal
- RAILS_ENV=development
redis:
image: redis:latest
ports:
- 6379:6379
postgres: postgres:
image: postgres:15 image: postgres:15
volumes: volumes:
@ -26,6 +37,9 @@ services:
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 5 retries: 5
ports:
- 5432:5432
# caddy: # caddy:
# image: caddy:latest # image: caddy:latest
@ -38,3 +52,4 @@ services:
# - .:/data # - .:/data
# environment: # environment:
# - HOST=${HOST} # - HOST=${HOST}

@ -52,9 +52,10 @@ Puma::Plugin.create do
Process.setsid Process.setsid
Dir.chdir(ENV.fetch('WORKDIR', nil)) unless ENV['WORKDIR'].to_s.empty? Dir.chdir(ENV.fetch('WORKDIR', nil)) unless ENV['WORKDIR'].to_s.empty?
if ENV['DOCKER_REDIS'].to_s.empty?
exec('redis-server', '--requirepass', Digest::SHA1.hexdigest("redis#{ENV.fetch('SECRET_KEY_BASE', '')}"), exec('redis-server', '--requirepass', Digest::SHA1.hexdigest("redis#{ENV.fetch('SECRET_KEY_BASE', '')}"),
out: '/dev/null') out: '/dev/null')
end
end end
end end

@ -6,10 +6,26 @@ module.exports = {
themes: [ themes: [
{ {
winter: { winter: {
...require("daisyui/src/theming/themes")["winter"], "primary": "#0055ff",
"base-100": "#010066", "primary-content": "#cee1ff",
"base-200": "#010177", "secondary": "#009b3d",
"base-300": "#010277", "secondary-content": "#000901",
"accent": "#0095eb",
"accent-content": "#000813",
"neutral": "#191611",
"neutral-content": "#cbcac9",
"base-100": "#092531",
"base-200": "#071f29",
"base-300": "#051922",
"base-content": "#c9cfd2",
"info": "#0088f3",
"info-content": "#000614",
"success": "#4ddb71",
"success-content": "#021104",
"warning": "#ffbc2a",
"warning-content": "#160d01",
"error": "#e92d4e",
"error-content": "#130102",
}, },
docuseal: { docuseal: {
'color-scheme': 'light', 'color-scheme': 'light',

Loading…
Cancel
Save