mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-18 20:59:39 +02:00
devContainer: Use Redis for ActiveJob and ActionCable. (#2017)
* devContainer: Use Redis for ActiveJob and ActionCable * devContainer: Simplify environment variables for services. * devContainer: Remove version field as it's no longer required in Compose.
This commit is contained in:
parent
b41897b5e5
commit
54f5a44a60
1 changed files with 29 additions and 9 deletions
|
@ -1,4 +1,15 @@
|
||||||
version: "3"
|
x-db-env: &db_env
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_DB: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
|
||||||
|
x-rails-env: &rails_env
|
||||||
|
DB_HOST: db
|
||||||
|
HOST: "0.0.0.0"
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
BUNDLE_PATH: /bundle
|
||||||
|
REDIS_URL: redis://redis:6379/1
|
||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
|
@ -16,32 +27,41 @@ services:
|
||||||
command: sleep infinity
|
command: sleep infinity
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
DB_HOST: db
|
<<: *rails_env
|
||||||
HOST: "0.0.0.0"
|
|
||||||
POSTGRES_USER: postgres
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
BUNDLE_PATH: /bundle
|
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
|
worker:
|
||||||
|
build:
|
||||||
|
context: ..
|
||||||
|
dockerfile: .devcontainer/Dockerfile
|
||||||
|
command: bundle exec sidekiq
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
<<: *rails_env
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:latest
|
image: redis:latest
|
||||||
ports:
|
ports:
|
||||||
- "6379:6379"
|
- "6379:6379"
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- redis-data:/data
|
||||||
db:
|
db:
|
||||||
image: postgres:latest
|
image: postgres:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- postgres-data:/var/lib/postgresql/data
|
- postgres-data:/var/lib/postgresql/data
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: postgres
|
<<: *db_env
|
||||||
POSTGRES_DB: postgres
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres-data:
|
postgres-data:
|
||||||
|
redis-data:
|
||||||
bundle_cache:
|
bundle_cache:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue