54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
version: '3.9'
|
|
|
|
services:
|
|
# MySQL Database
|
|
mysql:
|
|
image: mysql:8.0
|
|
container_name: hersel_mysql
|
|
restart: always
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: root_password_change_me
|
|
MYSQL_DATABASE: hersel_portfolio
|
|
MYSQL_USER: hersel_user
|
|
MYSQL_PASSWORD: secure_password_123
|
|
ports:
|
|
- "3307:3306"
|
|
volumes:
|
|
- mysql_data:/var/lib/mysql
|
|
- ./init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
|
command: --default-authentication-plugin=mysql_native_password
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
|
timeout: 20s
|
|
retries: 10
|
|
|
|
# Quart Application
|
|
quartapp:
|
|
build: .
|
|
container_name: hersel_app
|
|
restart: always
|
|
ports:
|
|
- "127.0.0.1:5000:5000"
|
|
environment:
|
|
- DEBUG=False
|
|
- SECRET_KEY=super-secret-key-change-in-production-please
|
|
- DB_HOST=mysql
|
|
- DB_PORT=3306
|
|
- DB_USER=hersel_user
|
|
- DB_PASSWORD=secure_password_123
|
|
- DB_NAME=hersel_portfolio
|
|
- PYTHONUNBUFFERED=1
|
|
depends_on:
|
|
mysql:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./static/uploads:/app/static/uploads
|
|
|
|
volumes:
|
|
mysql_data:
|
|
driver: local
|
|
|
|
networks:
|
|
default:
|
|
name: hersel_network
|