-
Notifications
You must be signed in to change notification settings - Fork 0
/
stack.yml
55 lines (50 loc) · 1.17 KB
/
stack.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
version: '3.1'
services:
ghost:
image: ghost:1-alpine
restart: always
depends_on:
- db
environment:
# see https://docs.ghost.org/docs/config#section-running-ghost-with-config-env-variables
database__client: mysql
database__connection__host: db
database__connection__user: root
database__connection__password: example
database__connection__database: ghost
db:
image: mysql:5.7
restart: always
volumes:
#数据库的数据持久化到磁盘
- ./data/mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: example
nginx:
build:
context: ./nginx
ports:
- "80:80"
- "443:443"
links:
- ghost
- phpmyadmin
volumes:
#server配置
- ./nginx/sites:/etc/nginx/sites-available
#日志
- ./nginx/logs:/var/log/nginx
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
depends_on:
- db
environment:
- PMA_HOST=db
- PMA_PORT=3306
- PMA_USER=root
- PMA_PASSWORD=example
restart: always
volumes:
- /sessions