-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.prod.yml
63 lines (57 loc) · 1.56 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: '3'
services:
mongo:
restart: unless-stopped
image: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=<username>
- MONGO_INITDB_ROOT_PASSWORD=<password>
- MONGO_INITDB_DATABASE=auth
volumes:
- ./db/mongo-db:/data/db
networks:
- dgray-network
server:
restart: unless-stopped
build:
context: ./server
dockerfile: Dockerfile
ports:
- "4031:3001"
environment:
- NODE_ENV=production
- PORT=3001 # MUST match with Internal port above ^
- DATABASE_URI=mongo # match with mongo container_name
- DATABASE_PORT=27017 # match with mongo container
- MONGO_USER=<username> # match with mongo container
- MONGO_PASS=<password> # match with mongo container
- MONGODB_COLLECTION=dgrayCollection
- REFRESH_TOKEN_SECRET=<secrethash>
- ACCESS_TOKEN_SECRET=<secrethash>
- FRONTEND_URL_ORIGIN=https://app.mywebsite.com
- FRONTEND_URL_PORT=443 # if using SSL = 443
depends_on:
- mongo
networks:
- dgray-network
# nginx built inside
client:
restart: unless-stopped
build:
context: ./client
dockerfile: Dockerfile
ports:
- 4030:80 # because nginx is inside this container too
environment:
- REACT_APP__API_IP=https://app.mywebsite.com
- REACT_APP__API_PORT=443 # MUST match API external port. use 433 if https://
depends_on:
- server
networks:
- dgray-network
# add to ngnix-prox-mgmt network
networks:
dgray-network:
driver: bridge
volumes:
mongo-db: