Updates Docker compose
This commit is contained in:
@@ -1,20 +1,13 @@
|
|||||||
# 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:
|
services:
|
||||||
mariadb:
|
mariadb:
|
||||||
image: mariadb:11
|
image: mariadb
|
||||||
network_mode: host
|
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
|
MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
|
||||||
MYSQL_DATABASE: ${DB_NAME}
|
MARIADB_DATABASE: ${DB_NAME}
|
||||||
MYSQL_USER: ${DB_USER}
|
MARIADB_USER: ${DB_USER}
|
||||||
MYSQL_PASSWORD: ${DB_PASSWORD}
|
MARIADB_PASSWORD: ${DB_PASSWORD}
|
||||||
|
ports:
|
||||||
|
- 3306:3306
|
||||||
volumes:
|
volumes:
|
||||||
- mariadb_data:/var/lib/mysql
|
- mariadb_data:/var/lib/mysql
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -24,55 +17,54 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
adminer:
|
adminer:
|
||||||
image: adminer
|
image: adminer
|
||||||
network_mode: host
|
ports:
|
||||||
command: php -S [::]:8888 -t /var/www/html
|
- 8080:8080
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
minio:
|
minio:
|
||||||
image: minio/minio
|
image: minio/minio
|
||||||
network_mode: host
|
command: server /data --console-address ":9001"
|
||||||
command: server /data --console-address :9001
|
|
||||||
environment:
|
environment:
|
||||||
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY}
|
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY}
|
||||||
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY}
|
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY}
|
||||||
|
ports:
|
||||||
|
- 15900:9000 # API
|
||||||
|
- 15901:9001 # Web UI
|
||||||
volumes:
|
volumes:
|
||||||
- minio_data:/data
|
- minio_data:/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
test: ["CMD", "curl", "-f", "http://192.168.187.181:15900/minio/health/live"]
|
||||||
start_period: 10s
|
start_period: 10s
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
api:
|
api:
|
||||||
build: .
|
image: git.halfbinary.net/aarbit/scavengerhunt-api:2
|
||||||
network_mode: host
|
|
||||||
environment:
|
environment:
|
||||||
DB_URL: jdbc:mariadb://localhost:3306/${DB_NAME}
|
DB_URL: jdbc:mariadb://192.168.187.181:3306/${DB_NAME}
|
||||||
DB_USER: ${DB_USER}
|
DB_USER: ${DB_USER}
|
||||||
DB_PASSWORD: ${DB_PASSWORD}
|
DB_PASSWORD: ${DB_PASSWORD}
|
||||||
JWT_SECRET: ${JWT_SECRET}
|
JWT_SECRET: ${JWT_SECRET}
|
||||||
MINIO_ENDPOINT: http://localhost:9000
|
MINIO_ENDPOINT: http://192.168.187.181:15900
|
||||||
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
|
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
|
||||||
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
|
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
|
||||||
MINIO_BUCKET: ${MINIO_BUCKET}
|
MINIO_BUCKET: ${MINIO_BUCKET}
|
||||||
|
ports:
|
||||||
|
- 15808:8080
|
||||||
depends_on:
|
depends_on:
|
||||||
mariadb:
|
mariadb:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
minio:
|
minio:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
|
test: ["CMD", "curl", "-f", "http://192.168.187.181:15808/actuator/health"]
|
||||||
start_period: 30s
|
start_period: 30s
|
||||||
interval: 15s
|
interval: 15s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mariadb_data:
|
mariadb_data:
|
||||||
minio_data:
|
minio_data:
|
||||||
Reference in New Issue
Block a user