-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-prod.yml
43 lines (37 loc) · 1.05 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
version: '3'
volumes:
frontend-volume:
services:
##############################################################
# Setup node container
##############################################################
backend:
build: ./backend
expose:
- ${APP_SERVER_PORT}
environment:
API_HOST: ${API_HOST}
APP_SERVER_PORT: ${APP_SERVER_PORT}
DB_CONNECTION: ${DB_CONNECTION}
ports:
- ${APP_SERVER_PORT}:${APP_SERVER_PORT}
volumes:
- ./backend/:/srv/app/wildcard-backend/
- frontend-volume:/srv/app/wildcard-front/
command: npm run dev
##############################################################
# Setup client container
##############################################################
frontend:
build: ./frontend
expose:
- ${REACT_APP_PORT}
environment:
REACT_APP_PORT: ${REACT_APP_PORT}
ports:
- ${REACT_APP_PORT}:${REACT_APP_PORT}
volumes:
- frontend-volume:/srv/app/wildcard-front/
links:
- backend
command: sh -c "npm install && npm run build"