-
Notifications
You must be signed in to change notification settings - Fork 5
/
example_docker-compose.yml
63 lines (63 loc) · 1.44 KB
/
example_docker-compose.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
version: '2'
services:
nginx-api:
image: nginx
depends_on:
- api
ports:
- "3001:443"
environment:
NODE_TLS_REJECT_UNAUTHORIZED: 0
volumes:
- ./api/api.nginx.site:/etc/nginx/conf.d/default.conf
- ./api/certs/.:/etc/nginx/certs
api:
build: api/.
command: yarn start
depends_on:
- db
environment:
NODE_TLS_REJECT_UNAUTHORIZED: 0
NODE_ENV: development
COOKIE_SECRET: ChangeMe1234
env_file:
- api/.env
ports:
- '8080:3000'
volumes:
- ./api/.:/opt/app
- /opt/app/node_modules
nginx-frontend:
image: nginx
depends_on:
- frontend
ports:
- "3000:443"
environment:
NODE_TLS_REJECT_UNAUTHORIZED: 0
volumes:
- ./frontend/frontend.nginx.site:/etc/nginx/conf.d/default.conf
- ./frontend/certs/.:/etc/nginx/certs
frontend:
build: frontend/.
command: yarn start
environment:
NODE_TLS_REJECT_UNAUTHORIZED: 0
NODE_ENV: development
COOKIE_SECRET: ChangeMe1234
API_URL: "https://nginx-api"
ports:
- "0.0.0.0:3030:3000"
volumes:
- ./frontend/.:/opt/frontend
- /opt/frontend/node_modules
db:
build: db/.
environment:
NODE_TLS_REJECT_UNAUTHORIZED: 0
POSTGRES_PASSWORD: localdev
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- ./db/postgres-data:/var/lib/postgresql/data/pgdata
ports:
- '8001:5432'