-
-
Notifications
You must be signed in to change notification settings - Fork 133
/
docker-compose.yml
102 lines (94 loc) · 2.34 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
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
version: "3.4"
services:
blog-backend:
restart: unless-stopped
image: ${REGISTRY}/blog-backend:${IMAGE_TAG}
build:
context: blog
dockerfile: docker/prod/php/Dockerfile
target: stage
environment:
YII_ENV: prod
YII_DEBUG: "false"
healthcheck:
disable: true
volumes:
- /etc/group:/etc/group:r
- /etc/passwd:/etc/passwd:r
- blog-assets:/app/public/assets:delegated
blog-nginx:
restart: unless-stopped
image: ${REGISTRY}/blog-nginx:${IMAGE_TAG}
build:
context: blog
dockerfile: docker/prod/nginx/Dockerfile
depends_on:
- blog-backend
volumes:
- blog-assets:/app/public/assets:ro
blog-api-backend:
restart: unless-stopped
image: ${REGISTRY}/blog-api-backend:${IMAGE_TAG}
build:
context: blog-api
dockerfile: docker/prod/php/Dockerfile
target: stage
environment:
YII_ENV: prod
YII_DEBUG: "false"
healthcheck:
disable: true
volumes:
- /etc/group:/etc/group:r
- /etc/passwd:/etc/passwd:r
- blog-api-assets:/app/public/assets:delegated
blog-api-nginx:
restart: unless-stopped
image: ${REGISTRY}/blog-api-nginx:${IMAGE_TAG}
build:
context: blog-api
dockerfile: docker/prod/nginx/Dockerfile
depends_on:
- blog-api-backend
volumes:
- blog-api-assets:/app/public/assets:ro
demo:
restart: unless-stopped
image: ${REGISTRY}/demo-nginx:${IMAGE_TAG}
build:
context: demo
dockerfile: Dockerfile
gateway:
restart: unless-stopped
image: ${REGISTRY}/gateway-nginx:${IMAGE_TAG}
build:
context: gateway/nginx
dockerfile: prod/Dockerfile
environment:
DOMAIN: ${DOMAIN}
volumes:
- ./var/ssl:/etc/letsencrypt:r
depends_on:
- demo
- blog-nginx
- blog-api-nginx
ports:
- 80:80
- 443:443
certbot:
restart: "no"
image: certbot/certbot
volumes:
- ./var/ssl:/etc/letsencrypt:rw
command: >
certonly --webroot --webroot-path=/etc/letsencrypt/www
--email ${SUPPORT_EMAIL} --agree-tos --no-eff-email
--force-renewal -d ${DOMAIN} -v
# --dry-run
# --preferred-challenges dns
# --force-renewal -d *.${DOMAIN} -v
volumes:
blog-assets:
driver: local
blog-api-assets:
driver: local