-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
65 lines (62 loc) · 1.56 KB
/
docker-compose.yaml
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
version: '3.9'
services:
mongodb:
container_name: taotip-mongodb
image: mongo:5.0.8
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpassword
networks:
- backend
volumes:
- mongodb_data_container:/data/db
- ./mongodb/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
taotip:
container_name: taotip
restart: always
build:
context: ./taotip/
dockerfile: Dockerfile
volumes:
- taotip_data_container:/data/taotip
depends_on:
- mongodb
networks:
- backend
export-service:
container_name: export-service
restart: always
build:
context: ./taotip-export/
dockerfile: Dockerfile
depends_on:
- mongodb
networks:
- backend
nginx:
image: nginx:1.15-alpine
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx:/etc/nginx/conf.d
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
networks:
- backend
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
restart: on-failure[:2] # restart on failure, max 2 times
image: certbot/certbot
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
mongodb_data_container:
taotip_data_container:
networks:
backend:
driver: bridge