94 lines
2.1 KiB
YAML
94 lines
2.1 KiB
YAML
services:
|
|
|
|
backend:
|
|
build: ./backend
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "/usr/bin/curl", "-f", "http://localhost:8080/api/service/health"]
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 3
|
|
environment:
|
|
POSTGRES_URL: ${POSTGRES_URL}
|
|
REDIS_URL: ${REDIS_URL}
|
|
MINIO_URL: ${MINIO_URL}
|
|
ports:
|
|
- "8080:8080"
|
|
networks:
|
|
- easywish-network
|
|
|
|
frontend:
|
|
build: ./frontend
|
|
restart: unless-stopped
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
networks:
|
|
- easywish-network
|
|
|
|
minio:
|
|
image: minio/minio
|
|
healthcheck:
|
|
test: [ "CMD", "curl", "-I", "localhost:9000/minio/health/live" ]
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 3
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
|
|
ports:
|
|
- "9000:9000"
|
|
command: server /data
|
|
networks:
|
|
- easywish-network
|
|
volumes:
|
|
- minio_data:/data
|
|
|
|
postgres:
|
|
image: postgres:latest
|
|
healthcheck:
|
|
test: [ "CMD", "pg_isready", "-q", "-d", "${POSTGRES_DB}", "-U", "${POSTGRES_USER}" ]
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 3
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
ports:
|
|
- "5432:5432"
|
|
networks:
|
|
- easywish-network
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./sqlc/schema.sql:/docker-entrypoint-initdb.d/init.sql
|
|
|
|
redis:
|
|
image: eqalpha/keydb
|
|
healthcheck:
|
|
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 3
|
|
command: ["keydb-server", "--requirepass", "${REDIS_PASSWORD}"]
|
|
environment:
|
|
REDIS_PASSWORD: ${REDIS_PASSWORD}
|
|
ports:
|
|
- "6379:6379"
|
|
networks:
|
|
- easywish-network
|
|
|
|
volumes:
|
|
postgres_data:
|
|
minio_data:
|
|
networks:
|
|
easywish-network:
|
|
driver: bridge
|