-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml.example
107 lines (99 loc) · 2.36 KB
/
docker-compose.yml.example
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
version: "3.8"
services:
backend:
image: "eusoff/backend:latest"
build: ./backend/
restart: unless-stopped
environment:
- WAIT_HOSTS=mongodb:27017
- WAIT_HOSTS_TIMEOUT=300
- WAIT_SLEEP_INTERVAL=10
- WAIT_HOST_CONNECT_TIMEOUT=30
env_file: ./backend/.env
depends_on:
- mongodb
- redis
links:
- mongodb
networks:
- mongodb_network
- backend
- redis
frontend:
image: "eusoff/frontend:latest"
build: ./frontend/
restart: unless-stopped
env_file: ./frontend/.env
networks:
- frontend
mongodb:
# image: "mongodb/mongodb-community-server:6.0-ubi8"
image: "bitnami/mongodb:5.0.23"
restart: unless-stopped
environment:
- MONGODB_USERNAME=eusoff
- MONGODB_PASSWORD=smallcoock
- MONGODB_DATABASE=db
- MONGODB_ROOT_PASSWORD=smallcoock
- MONGODB_REPLICA_SET_MODE=primary
- MONGODB_REPLICA_SET_NAME=rs0
- MONGODB_REPLICA_SET_KEY=replicasetkey123
- MONGODB_ADVERTISED_HOSTNAME=eusoff.college
ports:
- 27017:27017
volumes:
- mongodb:/bitnami/mongodb
- ./mongod.conf:/etc/mongo/mongod.conf
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
networks:
- mongodb_network
redis:
image: redis:7.2.1
restart: unless-stopped
networks:
- redis
volumes:
- redis:/data
nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- certbot-etc:/etc/letsencrypt
- certbot-var:/var/lib/letsencrypt
- web-root:/var/www/html
depends_on:
- backend
- frontend
ports:
- 443:443
- 80:80
networks:
- backend
- frontend
# certbot:
# image: certbot/certbot
# container_name: certbot
# volumes:
# - certbot-etc:/etc/letsencrypt
# - certbot-var:/var/lib/letsencrypt
# - web-root:/var/www/html
# depends_on:
# - nginx
# command: certonly --webroot --webroot-path=/var/www/html --email [email protected] --agree-tos --no-eff-email --force-renewal -d eusoff.college -d www.eusoff.college
volumes:
mongodb:
redis:
certbot-etc:
certbot-var:
web-root:
networks:
mongodb_network:
driver: bridge
redis:
driver: bridge
backend:
driver: bridge
name: backend
frontend:
driver: bridge
name: frontend