-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
117 lines (109 loc) · 2.79 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
version: "3.9"
services:
website:
image: ${REGISTRY_BASE_URL}/website:latest
container_name: website
build:
context: ./website
dockerfile: dockerfile
args:
NEXT_PUBLIC_HOST: ${NEXT_PUBLIC_HOST}
NEXT_PUBLIC_ASSETS_URL: ${NEXT_PUBLIC_ASSETS_URL}
INTERNAL_CMS_URL: ${INTERNAL_CMS_URL}
CMS_REQUEST_TOKEN: ${CMS_REQUEST_TOKEN}
PUBLIC_ASSETS_DOMAIN: ${PUBLIC_ASSETS_DOMAIN}
NEXT_PUBLIC_REVALIDATE_IN_SECONDS: ${NEXT_PUBLIC_REVALIDATE_IN_SECONDS}
PREVIEW_SECRET_TOKEN: ${PREVIEW_SECRET_TOKEN}
restart: unless-stopped
env_file: website/.env
ports:
- ${DOCKER_WEBSITE_BIND:-8000}:8000
networks:
- frontend
- public
profiles:
- required
strapi:
image: ${REGISTRY_BASE_URL}/strapi:latest
container_name: strapi
build:
context: ./strapi
dockerfile: dockerfile
args:
CLIENT_URL: ${CLIENT_URL}
CLIENT_PREVIEW_SECRET: ${CLIENT_PREVIEW_SECRET}
restart: unless-stopped
env_file: strapi/.env
ports:
- ${DOCKER_STRAPI_BIND:-5000}:5000
volumes:
- strapi_uploads:/usr/local/src/strapi/public/uploads:rw
networks:
- frontend
- backend
- public
profiles:
- required
postgres:
image: postgres:13-alpine
container_name: postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- ${DOCKER_POSTGRES_BIND:-5432}:5432
volumes:
- postgres_data:/var/lib/postgresql/data:rw
networks:
- backend
profiles:
- optional
nginx:
image: nginx:1.20-alpine
container_name: nginx
restart: unless-stopped
environment:
NGINX_ENTRYPOINT_QUIET_LOGS: 1
ports:
- ${DOCKER_NGINX_HTTP_BIND:-80}:80
- ${DOCKER_NGINX_HTTPS_BIND:-443}:443
volumes:
- certbot_data:/etc/letsencrypt:ro
- certbot_webroot_path:/var/www/letsencrypt:ro
- dhparam_data:/etc/nginx/dhparam:ro
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/ssl:/etc/nginx/ssl:ro
- ./nginx/services/${NGINX_PROTOCOL}:/etc/nginx/services:ro
networks:
- public
profiles:
- setup
certbot:
image: certbot/certbot:v1.22.0
container_name: certbot
volumes:
- certbot_data:/etc/letsencrypt:rw
- certbot_webroot_path:/var/www/letsencrypt:rw
profiles:
- runnable
openssl:
container_name: openssl
build:
context: ./openssl
dockerfile: dockerfile
volumes:
- dhparam_data:/etc/openssl/dhparam:rw
profiles:
- runnable
volumes:
strapi_uploads:
postgres_data:
certbot_data:
certbot_webroot_path:
dhparam_data:
networks:
public:
frontend:
backend: