-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
59 lines (59 loc) · 2.07 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
services:
database_queue:
image: redis:7
ports:
- ${DATABASE_QUEUE_PORT}:6379
command: redis-server --requirepass ${DATABASE_QUEUE_PASSWORD}
networks:
- pc_network
database_nosql:
image: mongo:6
environment:
MONGO_INITDB_ROOT_USERNAME: ${DATABASE_PRIMARY_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${DATABASE_PRIMARY_PASSWORD}
ports:
- ${DATABASE_PRIMARY_PORT}:27017
volumes:
- ./container/mongo/data:/data/db
networks:
- pc_network
app_api:
build: ./container/python/
volumes:
- ./app_api/:/project/app_api/
command: ${APP_API_COMMAND}
networks:
- pc_network
# appweb:
# build: ./container/python/
# volumes:
# - ./appWeb/:/project/
# command: 'gunicorn --chdir ${WEB_PROJECT_NAME} -w ${WEB_GUNICORN_WORKER} --bind :8000 ${WEB_PROJECT_NAME}.wsgi:application'
# networks:
# - pc_network
webserver:
image: nginx:1
ports:
- ${WEBSERVER_PORT}:8000
- 443:443
volumes:
- './container/nginx/nginx.conf:/etc/nginx/nginx.conf'
- './container/nginx/default.conf:/etc/nginx/conf.d/default.conf'
- './container/nginx/ssl_conf/:/etc/letsencrypt'
- './container/nginx/ssl_data/:/var/www/certbot'
- './log:/var/log/nginx/'
# - './app_web/template/static/:/app_web/static/'
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
networks:
- pc_network
# certbot:
# image: certbot/certbot
# volumes:
# - './container/nginx/ssl_conf/:/etc/letsencrypt'
# - './container/nginx/ssl_data/:/var/www/certbot'
# entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
# networks:
# - pc_network
networks:
pc_network:
driver: bridge