59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
services:
|
|
mariadb:
|
|
image: mariadb:11.0
|
|
container_name: blogging-cms-db
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-root_password}
|
|
MYSQL_DATABASE: ${DB_NAME:-blogging_cms}
|
|
MYSQL_USER: ${DB_USER:-cms_user}
|
|
MYSQL_PASSWORD: ${DB_PASSWORD:-cms_password}
|
|
volumes:
|
|
- mariadb_data:/var/lib/mysql
|
|
ports:
|
|
- "3306:3306"
|
|
networks:
|
|
- blogging-network
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
|
start_period: 10s
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: blogging-cms-app
|
|
depends_on:
|
|
mariadb:
|
|
condition: service_healthy
|
|
environment:
|
|
DB_HOST: mariadb
|
|
DB_PORT: 3306
|
|
DB_USER: ${DB_USER:-cms_user}
|
|
DB_PASSWORD: ${DB_PASSWORD:-cms_password}
|
|
DB_NAME: ${DB_NAME:-blogging_cms}
|
|
PORT: ${PORT:-8080}
|
|
SITE_URL: ${SITE_URL:-http://localhost:8080}
|
|
SESSION_KEY: ${SESSION_KEY:-change-me-in-production}
|
|
volumes:
|
|
- ./templates:/app/templates:ro
|
|
- ./static:/app/static:ro
|
|
ports:
|
|
- "${PORT:-8080}:8080"
|
|
networks:
|
|
- blogging-network
|
|
restart: unless-stopped
|
|
labels:
|
|
coolify.enabled: "true"
|
|
coolify.pull_request.deploy_preview: "false"
|
|
|
|
volumes:
|
|
mariadb_data:
|
|
driver: local
|
|
|
|
networks:
|
|
blogging-network:
|
|
driver: bridge |