105 lines
2.8 KiB
YAML
105 lines
2.8 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: hanwha-demo-db
|
|
environment:
|
|
POSTGRES_DB: hanwha_demo
|
|
POSTGRES_USER: hanwha
|
|
POSTGRES_PASSWORD: hanwha1234
|
|
ports:
|
|
- "15432:5432"
|
|
volumes:
|
|
- db-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U hanwha -d hanwha_demo"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
minio:
|
|
image: minio/minio:RELEASE.2024-10-13T13-34-11Z
|
|
container_name: hanwha-demo-minio
|
|
command: server /data --console-address ":9001"
|
|
environment:
|
|
MINIO_ROOT_USER: minioadmin
|
|
MINIO_ROOT_PASSWORD: minioadmin
|
|
ports:
|
|
- "19000:9000"
|
|
- "19001:9001"
|
|
volumes:
|
|
- minio-data:/data
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: server/api/Dockerfile
|
|
image: hanwha-nexacro-api:local
|
|
container_name: hanwha-demo-api
|
|
environment:
|
|
DB_URL: jdbc:postgresql://db:5432/hanwha_demo
|
|
DB_USERNAME: hanwha
|
|
DB_PASSWORD: hanwha1234
|
|
STORAGE_PROVIDER: minio
|
|
MINIO_ENDPOINT: http://minio:9000
|
|
MINIO_ACCESS_KEY: minioadmin
|
|
MINIO_SECRET_KEY: minioadmin
|
|
MINIO_BUCKET: reports
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_started
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -q -O - http://localhost:8080/actuator/health | grep UP >/dev/null 2>&1 || exit 1"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
batch:
|
|
image: hanwha-nexacro-api:local
|
|
container_name: hanwha-demo-batch
|
|
environment:
|
|
SPRING_PROFILES_ACTIVE: batch
|
|
DB_URL: jdbc:postgresql://db:5432/hanwha_demo
|
|
DB_USERNAME: hanwha
|
|
DB_PASSWORD: hanwha1234
|
|
STORAGE_PROVIDER: minio
|
|
MINIO_ENDPOINT: http://minio:9000
|
|
MINIO_ACCESS_KEY: minioadmin
|
|
MINIO_SECRET_KEY: minioadmin
|
|
MINIO_BUCKET: reports
|
|
BATCH_WORKER_NAME: batch-1
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_started
|
|
api:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -q -O - http://localhost:8080/actuator/health | grep UP >/dev/null 2>&1 || exit 1"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
proxy:
|
|
image: nginx:1.27-alpine
|
|
container_name: hanwha-demo-proxy
|
|
depends_on:
|
|
api:
|
|
condition: service_healthy
|
|
ports:
|
|
- "8080:80"
|
|
volumes:
|
|
- ./ops/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
|
- ./client/nexacro-deploy:/usr/share/nginx/html:ro
|
|
- ./sample-data:/usr/share/nginx/html/sample-data:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1/healthz || exit 1"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
volumes:
|
|
db-data:
|
|
minio-data:
|