rails_example/docker-compose.yml in sidekiq-unique-jobs-4.0.18 vs rails_example/docker-compose.yml in sidekiq-unique-jobs-5.0.0
- old
+ new
@@ -1,6 +1,6 @@
-version: '2'
+version: '3.1'
volumes:
postgres-data:
driver: local
redis-data:
driver: local
@@ -12,54 +12,35 @@
driver: bridge
back-tier:
driver: bridge
services:
- jobs: &app
- extends:
- file: common-services.yml
- service: rails
+ rspec:
+ image: ruby:2.4
+ working_dir: /usr/src/app
+ stdin_open: true
+ tty: true
+ volumes:
+ - .:/usr/src/app
+ - gems:/usr/local/bundle
entrypoint: /usr/src/app/dev-entrypoint.sh
- command: bundle exec sidekiq -c 25
+ command: bundle exec rspec
networks:
- back-tier
- depends_on:
- - postgres
- - redis
-
- web:
- extends:
- file: common-services.yml
- service: rails
- entrypoint: /usr/src/app/dev-entrypoint.sh
- command: bundle exec puma --bind tcp://0.0.0.0:3000
- ports:
- - 3000:3000
- networks:
- front-tier
- - back-tier
depends_on:
- postgres
- redis
+ environment:
+ PATH: /usr/src/app/bin:/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ REDIS_URL: redis://redis:6379
+ DATABASE_URL: postgresql://postgres:3x4mpl3@postgres:5433/rails_example_test
+ RAILS_ENV: test
+ RACK_ENV: test
- cable:
- extends:
- file: common-services.yml
- service: rails
- entrypoint: /usr/src/app/dev-entrypoint.sh
- command: bundle exec puma --bind tcp://0.0.0.0:28080 cable.ru
- ports:
- - 28080:28080
- networks:
- - front-tier
- - back-tier
- depends_on:
- - postgres
- - redis
-
redis:
- image: redis
+ image: redis:latest
ports:
# We'll bind our host's port 6379 to redis's port 6379, so we can use
# Redis Desktop Manager (or other tools) with it:
- 6379:6379
volumes:
@@ -70,14 +51,14 @@
# NOTE: See networks comment on the postgres service above.
networks: [ "back-tier" ]
postgres:
- image: postgres
+ image: postgres:latest
ports:
# We'll bind our host's port 5432 to postgres's port 5432, so we can use
# our database IDEs with it:
- - 5432:5432
+ - 5433:5433
volumes:
# We'll store the postgres data in the 'postgres-data' volume we defined:
- postgres-data:/var/lib/postgresql/data
networks:
# Make the database service available only on the "back-tier" network: