57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
services:
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: kamco-cd-nginx
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
- ./nginx/ssl:/etc/nginx/ssl:ro
|
|
- nginx-logs:/var/log/nginx
|
|
depends_on:
|
|
kamco-changedetection-api:
|
|
condition: service_healthy
|
|
networks:
|
|
- kamco-cds
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "--no-check-certificate", "https://localhost/monitor/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
kamco-changedetection-api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: kamco-cd-training-api:${IMAGE_TAG:-latest}
|
|
container_name: kamco-cd-training-api
|
|
expose:
|
|
- "8080"
|
|
environment:
|
|
- SPRING_PROFILES_ACTIVE=prod
|
|
- TZ=Asia/Seoul
|
|
volumes:
|
|
- ./app/model_output:/app/model-outputs
|
|
- ./app/train_dataset:/app/train-dataset
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
networks:
|
|
- kamco-cds
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080/monitor/health"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 40s
|
|
|
|
networks:
|
|
kamco-cds:
|
|
external: true
|
|
|
|
volumes:
|
|
nginx-logs:
|
|
driver: local
|