writefreely-docker/docker-compose.mariadb.yaml
Germán Martín a15d4e58cd
Add enhanced configuration and Docker Compose support for WriteFreely (#2)
* Update ini configuration. Add docker-compose examples
* remove unneeded network config
* Add docker compose instructions
* Correct sqlite location
* do not wait for MariaDB
* Use writefreely user
* Add .env instructions for docker compose
* Retry init if database is not ready
* Ignore production directories
* Improve init checks
* refactor init script

---------

Co-authored-by: Germán Martín <gmartin@gmartin.net>
2024-06-12 12:59:37 +03:00

32 lines
708 B
YAML

services:
writefreely-web:
container_name: writefreely-web
image: jrasanen/writefreely:latest
build:
context: .
init: true
env_file:
- .env
volumes:
- ./data:/data
ports:
- 8080:8080
depends_on:
- writefreely-db
restart: unless-stopped
writefreely-db:
container_name: writefreely-db
image: mariadb:latest
init: true
volumes:
- ./db-data:/var/lib/mysql
env_file:
- .env
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "mariadb-admin ping -h localhost -u${MARIADB_USER} -p${MARIADB_PASSWORD} || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 10s