[docker]: split commands between with new services

This commit is contained in:
João Geonizeli
2022-07-31 20:13:27 -03:00
parent d82dcbb16a
commit d72cc5f7c9

View File

@@ -13,16 +13,23 @@ x-rails: &rails
- db - db
services: services:
web: rails:
<<: *rails <<: *rails
container_name: progress-test-web container_name: progress-test-rails
command: > command: >
sh -c ' sh -c '
bundle check || bundle install && bundle check || bundle install &&
bin/rails server -b 0.0.0.0 -p 3000 | yarn build --watch' rm -f tmp/pids/server.pid &&
rails s -b 0.0.0.0'
ports: ports:
- "3000:3000" - "3000:3000"
esbuild:
<<: *rails
container_name: progress-test-esbuild
command:
sh -c 'yarn build --watch'
db: db:
image: postgres:11.3-alpine image: postgres:11.3-alpine
container_name: progress-test-db container_name: progress-test-db