-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.example.yaml
53 lines (48 loc) · 1.14 KB
/
docker-compose.example.yaml
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
version: "3"
networks:
myblog_network:
driver: bridge
volumes:
myblog_data:
mariadb_data:
secrets:
MYBLOG_DB_PASSWORD:
file: ./MYBLOG_DB_PASSWORD.secret
MARIADB_ROOT_PASSWORD:
file: ./MARIADB_ROOT_PASSWORD.secret
services:
classicpress:
image: marverix/classicpress:latest
container_name: "${MYBLOG}"
volumes:
- myblog_data:/data
networks:
- myblog_network
ports:
- 8000:80
depends_on:
- mariadb
environment:
- "CP_DB_NAME=${MYBLOG}_db"
- "CP_DB_USER=${MYBLOG}_user"
- "CP_DB_PASSWORD_FILE=/run/secrets/MYBLOG_DB_PASSWORD"
- "CP_DB_HOST=mariadb"
secrets:
- MYBLOG_DB_PASSWORD
restart: unless-stopped
mariadb:
image: mariadb:10.9.7
container_name: mariadb
volumes:
- mariadb_data:/var/lib/mysql
networks:
- myblog_network
environment:
- "MARIADB_AUTO_UPGRADE=1"
- "MARIADB_DATABASE=${MYBLOG}_db"
- "MARIADB_USER=${MYBLOG}_user"
- "MARIADB_PASSWORD_FILE=/run/secrets/MYBLOG_DB_PASSWORD"
- "MARIADB_ROOT_PASSWORD_FILE=/run/secrets/MARIADB_ROOT_PASSWORD"
secrets:
- MARIADB_ROOT_PASSWORD
restart: unless-stopped