cleanup 2

This commit is contained in:
Mykhailo Svishchov
2026-03-04 23:50:35 +02:00
parent da1649d3cd
commit bfdd7581fe
221 changed files with 619 additions and 649 deletions

View File

@@ -3,7 +3,7 @@ version: "3.9"
services:
db:
image: mysql:8.0
container_name: lottery-mysql
container_name: honey-mysql
restart: always
# Database credentials are read from the secret file via backend container
# The backend will construct the connection URL from SPRING_DATASOURCE_* properties
@@ -11,7 +11,7 @@ services:
# Option 1: Use environment variables (for MySQL container only)
# Note: MYSQL_USER cannot be "root" - root user is configured via MYSQL_ROOT_PASSWORD only
environment:
MYSQL_DATABASE: lottery_db
MYSQL_DATABASE: honey_db
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
# Option 2: Mount secret file and read values (more secure)
# This requires parsing the secret file or using a script
@@ -37,13 +37,13 @@ services:
timeout: 5s
retries: 5
networks:
- lottery-network
- honey-network
backend:
build:
context: .
dockerfile: Dockerfile
container_name: lottery-backend
container_name: honey-backend
depends_on:
db:
condition: service_healthy
@@ -60,7 +60,7 @@ services:
# Mount persistent avatar storage (absolute path for consistency)
- /opt/app/data/avatars:/app/data/avatars
# Mount secret configuration file (read-only)
- /run/secrets/lottery-config.properties:/run/secrets/lottery-config.properties:ro
- /run/secrets/honey-config.properties:/run/secrets/honey-config.properties:ro
# Mount logback config directory (editable on VPS without rebuilding)
# Note: File must exist on host before mounting. Run setup-logging.sh first.
- /opt/app/backend/config:/app/config:rw
@@ -83,7 +83,7 @@ services:
cpus: '4.0'
memory: 12G
networks:
- lottery-network
- honey-network
restart: always
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/actuator/health/liveness"]
@@ -98,7 +98,7 @@ services:
build:
context: .
dockerfile: Dockerfile
container_name: lottery-backend-new
container_name: honey-backend-new
depends_on:
db:
condition: service_healthy
@@ -115,7 +115,7 @@ services:
# Mount persistent avatar storage (absolute path for consistency)
- /opt/app/data/avatars:/app/data/avatars
# Mount secret configuration file (read-only)
- /run/secrets/lottery-config.properties:/run/secrets/lottery-config.properties:ro
- /run/secrets/honey-config.properties:/run/secrets/honey-config.properties:ro
# Mount logback config directory (editable on VPS without rebuilding)
# Note: File must exist on host before mounting. Run setup-logging.sh first.
- /opt/app/backend/config:/app/config:rw
@@ -138,7 +138,7 @@ services:
cpus: '4.0'
memory: 12G
networks:
- lottery-network
- honey-network
restart: always
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/actuator/health/liveness"]
@@ -150,7 +150,7 @@ services:
phpmyadmin:
image: phpmyadmin:latest
container_name: lottery-phpmyadmin
container_name: honey-phpmyadmin
restart: always
depends_on:
db:
@@ -175,7 +175,7 @@ services:
# Trust proxy headers (X-Forwarded-Proto, etc.)
PMA_TRUSTED_PROXIES: "127.0.0.1"
networks:
- lottery-network
- honey-network
# Resource limits for phpMyAdmin
deploy:
resources:
@@ -188,6 +188,6 @@ volumes:
driver: local
networks:
lottery-network:
honey-network:
driver: bridge