-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
77 lines (71 loc) · 1.72 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
70
71
72
73
74
75
76
77
version: '3'
volumes:
production_certbot_www: {}
production_certbot_conf: {}
services:
chat:
build:
context: ./chat
dockerfile: ./Dockerfile
container_name: production_chat
restart: always
networks:
- nginx-access
nginx:
build:
context: ./nginx
dockerfile: ./Dockerfile
image: production_nginx
container_name: production_nginx
restart: "always"
env_file:
- ./.envs/production/server_name
ports:
- '80:80'
- "443:443/tcp"
# - "443:443/udp"
networks:
- nginx-access
volumes:
- production_certbot_www:/var/www/certbot/:ro
- production_certbot_conf:/etc/nginx/ssl/:ro
healthcheck:
test: ps | grep "nginx" | grep "worker process" | grep -v "grep"
interval: 10s
retries: 10
start_period: 3s
timeout: 5s
certbot:
build:
context: ./certbot
dockerfile: ./Dockerfile
image: production_certbot
container_name: production_certbot
restart: "always"
depends_on:
nginx:
condition: service_healthy
env_file:
- ./.envs/production/server_name
- ./.envs/production/email
volumes:
- production_certbot_www:/var/www/certbot/:rw
- production_certbot_conf:/etc/letsencrypt/:rw
# apache:
# build:
# context: ./apache
# dockerfile: ./Dockerfile
# image: httpd:latest
# container_name: production_apache
# restart: always
# ports:
# - '80:80'
# - '443:443'
# networks:
# - web
# volumes:
# - production_certbot_www:/usr/local/apache2/htdocs
# - production_certbot_conf:/usr/local/apache2/conf
networks:
nginx-access:
driver: bridge