-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.production.yml
55 lines (50 loc) · 1.07 KB
/
docker-compose.production.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
version: "3.9"
services:
web:
build: .
container_name: sample_app.api
ports:
- 3000:3000
volumes:
- ./:/app
- /app/tmp
- gem-data:/usr/local/bundle
working_dir: /app
command: bundle exec puma -C config/puma.rb -e production
networks:
- sample_app-networks
depends_on:
- postgres
environment:
DATABASE_URL: postgres://postgres:password@5432:5432/api_production
POSTGRES_HOST_AUTH_METHOD: trust
stdin_open: true
tty: true
postgres:
image: postgres:13
container_name: sample_app.postgres
volumes:
- db-data:/var/lib/postgresql/data
networks:
- sample_app-networks
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- 5432:5432
redis:
image: redis
command: redis-server
container_name: sample_app.redis
volumes:
- redis-data:/var/shared/redis
networks:
- sample_app-networks
networks:
sample_app-networks:
name: sample_app
external: true
volumes:
db-data:
gem-data:
redis-data: