79 lines
2.0 KiB
YAML
79 lines
2.0 KiB
YAML
# All services use host networking so inter-service traffic goes over loopback with no bridge overhead.
|
|
# Ports (all bound directly on the host):
|
|
# API: 8080
|
|
# MariaDB: 3306
|
|
# Adminer: 8888
|
|
# MinIO API: 9000
|
|
# MinIO Console: 9001
|
|
|
|
services:
|
|
mariadb:
|
|
image: mariadb:11
|
|
network_mode: host
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
|
|
MYSQL_DATABASE: ${DB_NAME}
|
|
MYSQL_USER: ${DB_USER}
|
|
MYSQL_PASSWORD: ${DB_PASSWORD}
|
|
volumes:
|
|
- mariadb_data:/var/lib/mysql
|
|
healthcheck:
|
|
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
|
start_period: 10s
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
adminer:
|
|
image: adminer
|
|
network_mode: host
|
|
command: php -S [::]:8888 -t /var/www/html
|
|
restart: unless-stopped
|
|
|
|
minio:
|
|
image: minio/minio
|
|
network_mode: host
|
|
command: server /data --console-address :9001
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY}
|
|
volumes:
|
|
- minio_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
start_period: 10s
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
api:
|
|
build: .
|
|
network_mode: host
|
|
environment:
|
|
DB_URL: jdbc:mariadb://localhost:3306/${DB_NAME}
|
|
DB_USER: ${DB_USER}
|
|
DB_PASSWORD: ${DB_PASSWORD}
|
|
JWT_SECRET: ${JWT_SECRET}
|
|
MINIO_ENDPOINT: http://localhost:9000
|
|
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
|
|
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
|
|
MINIO_BUCKET: ${MINIO_BUCKET}
|
|
depends_on:
|
|
mariadb:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
|
|
start_period: 30s
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
mariadb_data:
|
|
minio_data:
|