76 lines
1.8 KiB
YAML
76 lines
1.8 KiB
YAML
version: '3.8'
|
|
services:
|
|
postgres:
|
|
image: postgres:16
|
|
container_name: occto_postgres
|
|
environment:
|
|
POSTGRES_USER: admin
|
|
POSTGRES_PASSWORD: adminpassword
|
|
POSTGRES_DB: occto_db
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- occto_network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U admin"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
minio:
|
|
image: minio/minio:latest
|
|
container_name: occto_minio
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
environment:
|
|
MINIO_ROOT_USER: admin
|
|
MINIO_ROOT_PASSWORD: adminpassword
|
|
volumes:
|
|
- minio_data:/data
|
|
networks:
|
|
- occto_network
|
|
command: server /data --console-address ":9001"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "timeout 5s bash -c ':> /dev/tcp/127.0.0.1/9000' || exit 1"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 10s
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
container_name: occto_frontend
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- NODE_ENV=production
|
|
- DATABASE_URL=postgresql://admin:adminpassword@postgres:5432/occto_db?schema=public
|
|
- MINIO_ENDPOINT=minio
|
|
- MINIO_PORT=9000
|
|
- MINIO_USE_SSL=false
|
|
- MINIO_ACCESS_KEY=admin
|
|
- MINIO_SECRET_KEY=adminpassword
|
|
- MINIO_BUCKET_NAME=occto-images
|
|
- JWT_SECRET=b33500bb3dc5504535c34cc5f79f4ca0f60994b093bded14d48f76c0c090f032234693219e60398cab053a9c55c1d426ef7b1768104db9040254ba7db452f708
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
networks:
|
|
- occto_network
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
occto_network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
postgres_data:
|
|
minio_data:
|