-
Notifications
You must be signed in to change notification settings - Fork 50
/
docker-compose.yml
46 lines (43 loc) · 1.32 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
version: '3'
services:
nginx:
image: nginx:latest
container_name: nginx
hostname: ghost-nginx
ports:
- 443:443
volumes:
- ./nginx/ssl/yourhost.xyz.key:/etc/nginx/yourhost.xyz.key:ro
- ./nginx/ssl/yourhost.xyz.crt:/etc/nginx/yourhost.xyz.crt:ro
- ./nginx/conf/ghost.conf:/etc/nginx/conf.d/ghost.conf:z
links:
- ghost
restart: always
ghost:
image: ghost:latest
container_name: ghost
hostname: ghost
volumes:
- $PWD/ghost/volumes/config.production.json:/var/lib/ghost/config.production.json:z #overwrite default settings
- ./ghost/content:/var/lib/ghost/content:z
expose:
- "3306"
environment: # this section can be commented to start in dev mode by default
- NODE_ENV=production # set either production or development, then it will load the respective config
restart: always
links:
- mysql
mysql:
image: mysql:latest
container_name: mysql
volumes:
- ./dbdata:/var/lib/mysql:z # Persist storage
expose:
- "3306"
environment:
# Beware of special characters in password that can be interpreted by shell
- MYSQL_ROOT_PASSWORD= #specify your root pass
- MYSQL_DATABASE=ghostdata
- MYSQL_USER=ghostusr
- MYSQL_PASSWORD= xyx #please change this
restart: always