forked from clean-docker/ghost-cms
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.production.yml
47 lines (43 loc) · 1.15 KB
/
docker-compose.production.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
version: '3'
services:
db:
image: mariadb:latest
container_name: db
restart: always
environment:
- MYSQL_ROOT_PASSWORD=root_db_password
- MYSQL_USER=ghost
- MYSQL_PASSWORD=ghost_db_password
- MYSQL_DATABASE=ghost_production
volumes:
- ./data/dbdata:/var/lib/mysql
ghost:
image: ghost:alpine
container_name: ghost
restart: unless-stopped
depends_on:
- db
volumes:
- ./content:/var/lib/ghost/content
- ./config.production.json:/var/lib/ghost/config.production.json
certbot:
image: certbot/certbot:latest
container_name: certbot
volumes:
- ./ssl/:/etc/letsencrypt/
- /usr/share/nginx/html:/usr/share/nginx/html
command: certonly -n --webroot -w /usr/share/nginx/html -d <domain> -d www.<domain>
nginx:
image: nginx:alpine
container_name: nginx
restart: unless-stopped
depends_on:
- ghost
ports:
- "80:80"
- "443:443"
volumes:
- ./ssl/:/etc/letsencrypt/
- /usr/share/nginx/html:/usr/share/nginx/html
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./nginx/logs:/var/log/nginx/