From d34f8900d701e4ba26d0d4efb6acb90250ea886a Mon Sep 17 00:00:00 2001 From: Gareth Date: Wed, 6 Aug 2025 15:05:45 -0400 Subject: [PATCH] divided foreman queued services into 3 containers. Web was exiting seemingly at random and seems to be a conflict between web, web-pack, and sidekiq being run through foreman. The division into 3 dev containers has been very consistent in building the project correctly --- compose.yaml | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/compose.yaml b/compose.yaml index ebaf7d5514..fa76337d1e 100644 --- a/compose.yaml +++ b/compose.yaml @@ -18,7 +18,6 @@ services: build: . ports: - 3000:3000 - - 3035:3035 volumes: - .:/usr/src/app - gems:/bundles @@ -30,6 +29,7 @@ services: - redis environment: DOCKER: true + DEV_CACHING: true OFN_DB_HOST: db OFN_REDIS_URL: redis://redis/ OFN_REDIS_JOBS_URL: redis://redis @@ -37,11 +37,41 @@ services: command: > bash -c "rm -f tmp/pids/server.pid && (bundle check || bundle install) && - bundle exec rake db:create && + bundle exec rails db:create && chmod +x ./script/load_schema.sh && ./script/load_schema.sh && yarn install && - bundle exec foreman start -f Procfile.docker" + bundle exec rails s -b 0.0.0.0 -p 3000" + + sidekiq: + build: . + command: bundle exec sidekiq + depends_on: + - db + - redis + volumes: + - .:/usr/src/app + - gems:/bundles + environment: + DOCKER: true + DEV_CACHING: true + OFN_DB_HOST: db + OFN_REDIS_URL: redis://redis/ + OFN_REDIS_JOBS_URL: redis://redis + OFN_REDIS_TEST_URL: redis://redis/3 + + webpack: + build: . + command: ./bin/webpack-dev-server + depends_on: + - web + ports: + - "3035:3035" + volumes: + - .:/usr/src/app + - gems:/bundles + environment: + WEBPACKER_DEV_SERVER_HOST: 0.0.0.0 volumes: gems: postgres: