forked from ita-social-projects/ZeroWaste
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
53 lines (51 loc) · 878 Bytes
/
docker-compose.yaml
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
version: '3.4'
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
- DATABASE_URL
depends_on:
- postgres
- redis
ports:
- target: 3000
published: 80
protocol: tcp
mode: host
env_file: .env
networks:
- postgres
- redis
links:
- postgres
- redis
environment:
RAILS_ENV: production
RAILS_SERVE_STATIC_FILES: "true"
RAILS_LOG_TO_STDOUT: "true"
postgres:
image: postgres:12.1
expose:
- "5432"
volumes:
- db_data:/var/lib/postgresql/data
env_file: .env.db
networks:
- postgres
redis:
image: redis:6-alpine
ports:
- 6379:6379
volumes:
- redis_data:/data
env_file: .env.db
networks:
- redis
networks:
postgres:
redis:
volumes:
db_data:
redis_data: