-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.yml
69 lines (63 loc) · 1.27 KB
/
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
64
65
66
67
68
69
version: "3.8"
services:
mongodb:
image: docker.io/bitnami/mongodb:latest
networks:
- database
restart: always
env_file: ./.env.production
environment:
- "MONGODB_PORT_NUMBER=$DB_PORT"
ports:
- $DB_PORT:$DB_PORT
volumes:
- "./mongodb/prod:/bitnami/mongodb"
node-app:
depends_on:
- mongodb
build: ./backend
networks:
- proxy
- database
restart: unless-stopped
env_file: ./.env.production
ports:
- $NODE_PORT:$NODE_PORT
react-app:
depends_on:
- node-app
build:
context: ./frontend
networks:
- proxy
env_file: ./.env.production
ports:
- $REACT_PORT:$REACT_PORT
nginx:
depends_on:
- react-app
- node-app
- mongodb
build:
context: ./nginx
args:
- NODE_PORT=$NODE_PORT
- REACT_PORT=$REACT_PORT
- SERVER_NAME=$SERVER_NAME
networks:
- proxy
restart: always
ports:
- 80:80
- 443:443
volumes:
- ./certbot/www:/var/www/certbot/:ro
- ./certbot/conf/:/etc/nginx/ssl/:ro
certbot:
image: certbot/certbot:latest
volumes:
- ./certbot/www/:/var/www/certbot/:rw
- ./certbot/conf/:/etc/letsencrypt/:rw
networks:
proxy:
database: