-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
42 lines (42 loc) · 1.05 KB
/
docker-compose.dev.yml
File metadata and controls
42 lines (42 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
version: '3.9'
services:
db:
image: postgres:16.2
volumes:
- ./tmp/db:/var/lib/postgresql/data
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: farm_api_development
redis:
image: redis:6.2
sidekiq:
build:
context: .
dockerfile: Dockerfile.dev
command: bundle exec sidekiq
depends_on:
- redis
volumes:
- .:/app
environment:
RAILS_ENV: development
REDIS_URL: redis://redis:6379/0
web:
build:
context: .
dockerfile: Dockerfile.dev
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails db:drop db:create db:migrate && bundle exec rails s -p 3000 -b '0.0.0.0'"
environment:
RAILS_ENV: development
FARM_API_DATABASE_USERNAME: user
FARM_API_DATABASE_PASSWORD: password
DATABASE_URL: "postgres://user:password@db:5432/farm_api_development"
REDIS_URL: redis://redis:6379/0
volumes:
- .:/app
ports:
- "3000:3000"
depends_on:
- db
- sidekiq