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

This commit is contained in:
Gareth
2025-08-06 15:05:45 -04:00
parent addf36a304
commit d34f8900d7

View File

@@ -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: