Initial commit: Quality App v2 - FG Scan Module with Reports
This commit is contained in:
93
docker-compose.yml
Normal file
93
docker-compose.yml
Normal file
@@ -0,0 +1,93 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# MariaDB Database Service
|
||||
mariadb:
|
||||
image: mariadb:11.0
|
||||
container_name: quality_app_mariadb
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-rootpassword}
|
||||
MYSQL_DATABASE: ${DB_NAME:-quality_db}
|
||||
MYSQL_USER: ${DB_USER:-quality_user}
|
||||
MYSQL_PASSWORD: ${DB_PASSWORD:-qualitypass}
|
||||
TZ: UTC
|
||||
ports:
|
||||
- "${DB_PORT:-3306}:3306"
|
||||
volumes:
|
||||
- ./data/db:/var/lib/mysql
|
||||
- ./data/db/backup:/var/lib/mysql/backup
|
||||
networks:
|
||||
- quality_network
|
||||
healthcheck:
|
||||
test: ["CMD", "mariadb-admin", "ping", "-h", "localhost"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
command: [
|
||||
"--character-set-server=utf8mb4",
|
||||
"--collation-server=utf8mb4_unicode_ci",
|
||||
"--max_connections=1000",
|
||||
"--max_allowed_packet=256M"
|
||||
]
|
||||
|
||||
# Flask Application Service
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: quality_app_v2
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
FLASK_ENV: ${FLASK_ENV:-production}
|
||||
FLASK_DEBUG: ${FLASK_DEBUG:-False}
|
||||
SECRET_KEY: ${SECRET_KEY:-change-this-in-production}
|
||||
DB_HOST: mariadb
|
||||
DB_PORT: ${DB_PORT:-3306}
|
||||
DB_USER: ${DB_USER:-quality_user}
|
||||
DB_PASSWORD: ${DB_PASSWORD:-qualitypass}
|
||||
DB_NAME: ${DB_NAME:-quality_db}
|
||||
APP_PORT: ${APP_PORT:-8080}
|
||||
APP_HOST: 0.0.0.0
|
||||
LOG_LEVEL: ${LOG_LEVEL:-INFO}
|
||||
ports:
|
||||
- "${APP_PORT:-8080}:8080"
|
||||
volumes:
|
||||
- ./app:/app/app
|
||||
- ./data/logs:/app/data/logs
|
||||
- ./data/uploads:/app/data/uploads
|
||||
- ./data/backups:/app/data/backups
|
||||
networks:
|
||||
- quality_network
|
||||
depends_on:
|
||||
mariadb:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/login"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 20s
|
||||
|
||||
# Nginx Reverse Proxy (Optional)
|
||||
# Uncomment the following section to use Nginx as a reverse proxy
|
||||
# nginx:
|
||||
# image: nginx:alpine
|
||||
# container_name: quality_app_nginx
|
||||
# restart: unless-stopped
|
||||
# ports:
|
||||
# - "80:80"
|
||||
# - "443:443"
|
||||
# volumes:
|
||||
# - ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
# - ./ssl:/etc/nginx/ssl:ro
|
||||
# networks:
|
||||
# - quality_network
|
||||
# depends_on:
|
||||
# - app
|
||||
|
||||
volumes: {}
|
||||
|
||||
networks:
|
||||
quality_network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user