-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
53 lines (49 loc) · 1.08 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
version: "3"
services:
web:
build: ./web
restart: unless-stopped
expose:
- "8080"
environment:
DB_PROTOCOL: mariadb
DB_HOST: db:3306
DB_USERNAME: $DB_USERNAME
DB_PASSWORD: $DB_PASSWORD
DB_NAME: $DB_NAME
FLASK_SECRET_KEY: $FLASK_SECRET_KEY
RP_ID: $RP_ID
RP_NAME: $RP_NAME
ORIGIN: $ORIGIN
db:
image: mariadb
restart: unless-stopped
expose:
- "3306"
environment:
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
MYSQL_DATABASE: $DB_NAME
MYSQL_USER: $DB_USERNAME
MYSQL_PASSWORD: $DB_PASSWORD
volumes:
- db_data:/var/lib/mysql
caddy:
image: caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
environment:
SITE_ADDRESS: $RP_ID
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
# External volumes are persistent and must be created
# using `docker volume create [project-name]_caddy_data`
volumes:
caddy_data:
external: true
caddy_config:
db_data:
external: true