-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
81 lines (73 loc) · 1.84 KB
/
docker-compose.dev.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
version: '3'
services:
# nginx server for proxy
nginx:
image: 'mattivdweem/pizza-party-nginx:latest'
depends_on:
- api
- platform
build:
context: ./nginx
dockerfile: config/docker/dev.Dockerfile
volumes:
- './nginx/nginx.conf:/etc/nginx/nginx.conf'
- './nginx/snippets:/etc/nginx/snippets'
- './nginx/certs:/etc/ssl/certs'
ports:
- '80:80'
- '8080:8080'
- '443:443'
environment:
NODE_ENV: development
networks:
- pizza-network
# node.js service for api
platform:
image: 'mattivdweem/pizza-party-platform:latest'
build:
context: ./platform
dockerfile: config/docker/dev.Dockerfile
volumes:
- './platform:/usr/src/app'
environment:
NODE_ENV: development
networks:
- pizza-network
# next.js service for react front-end
api:
image: 'mattivdweem/pizza-party-api:latest'
build:
context: ./api
dockerfile: config/docker/dev.Dockerfile
depends_on:
- db
volumes:
- './api:/usr/src/app'
- './api/config:/usr/src/app/config'
- './api/node_modules/:/usr/src/app/node_modules/'
- 'data-backend-volume:/var/lib/postgresql/data'
environment:
NODE_ENV: development
PORT: "7002"
networks:
- pizza-network
- data-backend-network
db:
image: postgres
ports:
- "54320:5432" # run on 54320 instead of 5432 to avoid collission on host system, this row can be removed after development.
networks:
- data-backend-network
environment:
POSTGRES_DB: "pizza-party-database"
# pre-defined networking
networks:
# the nginx network for proxy
pizza-network:
driver: bridge
# the databackend, to access databases
data-backend-network:
driver: bridge
# generated volumes
volumes:
data-backend-volume: