-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yml
44 lines (44 loc) · 1.08 KB
/
docker-compose.prod.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
version: "3"
services:
api:
container_name: next-api
volumes:
- ./api:/api
working_dir: /api
image: node:12.16.1-alpine3.9
command: sh -c "yarn && yarn pm2:start && yarn pm2:log"
ports:
- "${API_PORT_HOST}:${API_PORT}"
tty: true
stdin_open: true
environment:
- API_PORT=${API_PORT}
front:
container_name: next-front
volumes:
- ./front:/front
working_dir: /front
image: node:12.16.1-alpine3.9
command: sh -c "sh ./docker-compose.wait.api.sh && yarn && yarn build && yarn start"
ports:
- "${FRONT_PORT_HOST}:3000"
tty: true
stdin_open: true
environment:
- API_PORT=${API_PORT}
- FRONT_API_ENDPOINT_CLIENT=${FRONT_API_ENDPOINT_CLIENT}
- FRONT_API_ENDPOINT_SERVER=${FRONT_API_ENDPOINT_SERVER}
depends_on:
- api
web:
container_name: next-web
image: nginx:1.19-alpine
ports:
- "80:80"
- 443:443
volumes:
- ./web/public:/usr/share/nginx/html
- ./web/cert:/etc/nginx/cert
- ./web/conf.d:/etc/nginx/conf.d
depends_on:
- front