-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (51 loc) · 1.03 KB
/
Copy pathdocker-compose.yml
File metadata and controls
56 lines (51 loc) · 1.03 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Containers sorted in a way that depicts the their dependencies
version: '2'
services:
db:
container_name: spa_db
build:
context: ./config/dockerdb
dockerfile: Dockerfile
env_file: .env
restart: unless-stopped
volumes:
- raw_data:/var/lib/postgresql/data
ports:
# for development expose 5432 to host:12345
- "12345:5432"
expose:
# for production expose:5432 inside single-tier
- "5432"
networks:
- single-tier
backend:
build: .
container_name: spa
env_file: .env
restart: unless-stopped
depends_on:
- db
networks:
- single-tier
expose:
- "9999" # for containers in single-tier
nginx:
build: ./config/nginx
container_name: nginx
restart: unless-stopped
volumes_from:
- backend
depends_on:
- backend
ports:
- "8888:8888"
# - "8443:443"
networks:
- single-tier
volumes:
raw_data:
driver: local
pg-scripts:
driver: local
networks:
single-tier: