-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
44 lines (42 loc) · 1.44 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
services:
blog:
build: .
#image: registry.gitlab.matthewrease.net/matthew/blog-docker:latest
ports:
- "8080:8080" # Expose port 8080 for your app
environment:
- MYSQL_HOST=db
#- MYSQL_USER=blog
#- MYSQL_PASSWORD=blog
#- MYSQL_DATABASE=blog
- USE_CSP=false # Content Security Policy headers
- REBUILD_DB=true # clears database when `update db` is run
- UPDATE_DB=always # set to manual if you wish to run `update db` yourself
- PRIMARY_AUTHOR=Matthew Rease # make sure this value matches what you set in /app/blog/config.py
#volumes:
# - blog_posts:/app/posts:ro
# - blog_images:/app/blog/static/images:ro
# - /path/to/log:/app/blog/access.log
# - /path/to/icon:/app/blog/static/icon.webp:ro
# - /path/to/config:/app/blog/config.py:ro # make sure file exists
depends_on:
db:
condition: service_healthy
db:
image: mariadb:latest
environment:
MYSQL_ROOT_PASSWORD: rootpassword # Set the root password for the MariaDB container
MYSQL_USER: blog
MYSQL_PASSWORD: blog
MYSQL_DATABASE: blog
volumes:
- db_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mariadb-admin", "ping", "--host=127.0.0.1", "--user=root", "--password=rootpassword"]
interval: 10s
retries: 5
start_period: 30s
timeout: 5s
volumes:
db_data:
driver: local