init
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
networks:
|
||||
app_network:
|
||||
driver: bridge
|
||||
crabs-network:
|
||||
name: crabs-network
|
||||
external: true
|
||||
|
||||
services:
|
||||
evening_detective_server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.backend
|
||||
environment:
|
||||
APP_BASE_URL: ${APP_BASE_URL}
|
||||
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres_evening_detective_server:5432/${POSTGRES_DB}?sslmode=disable
|
||||
FILE_PREFIX_DOMAIN: ${FILE_PREFIX_DOMAIN}
|
||||
GAME_TIMEZONE: ${GAME_TIMEZONE:-Asia/Barnaul}
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
PARTICIPATION_SECRET: ${PARTICIPATION_SECRET}
|
||||
S3_BUCKET: ${S3_BUCKET}
|
||||
S3_HOST: http://rustfs_evening_detective_server:9000
|
||||
S3_PASSWORD: ${S3_PASSWORD}
|
||||
S3_USER: ${S3_USER}
|
||||
SMTP_HOST: ${SMTP_HOST}
|
||||
SMTP_PASSWORD: ${SMTP_PASSWORD}
|
||||
SMTP_PORT: ${SMTP_PORT:-465}
|
||||
SMTP_REPLY_TO: ${SMTP_REPLY_TO}
|
||||
SMTP_TIMEOUT: ${SMTP_TIMEOUT:-10s}
|
||||
SMTP_USER: ${SMTP_USER}
|
||||
YANDEX_FORMS_TOKEN: ${YANDEX_FORMS_TOKEN}
|
||||
depends_on:
|
||||
postgres_evening_detective_server:
|
||||
condition: service_healthy
|
||||
rustfs_evening_detective_server:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- app_network
|
||||
- crabs-network
|
||||
labels:
|
||||
reproxy.1.server: "evening-detective-api.crabs-games.art"
|
||||
reproxy.1.route: "/(.*)"
|
||||
reproxy.1.dest: "http://evening_detective_server:8090/$$1"
|
||||
reproxy.1.port: "8090"
|
||||
reproxy.1.ping: "/"
|
||||
reproxy.1.priority: 10
|
||||
|
||||
evening_detective_frontend:
|
||||
image: byjg/static-httpserver:latest
|
||||
container_name: evening_detective_frontend
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./frontend/dist:/static:ro
|
||||
networks:
|
||||
- crabs-network
|
||||
labels:
|
||||
reproxy.1.server: "evening-detective.crabs-games.art"
|
||||
reproxy.1.route: "/(.*)"
|
||||
reproxy.1.dest: "http://evening_detective_frontend:8080/$$1"
|
||||
reproxy.1.port: "8080"
|
||||
reproxy.1.ping: "/"
|
||||
reproxy.1.priority: 100
|
||||
environment:
|
||||
SPA_MODE: "true"
|
||||
|
||||
postgres_evening_detective_server:
|
||||
image: postgres:15
|
||||
container_name: postgres_evening_detective_server
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
TZ: ${TZ:-Asia/Barnaul}
|
||||
PGTZ: ${PGTZ:-Asia/Barnaul}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- app_network
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB} -h localhost"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 6
|
||||
start_period: 10s
|
||||
|
||||
rustfs_evening_detective_server:
|
||||
image: rustfs/rustfs:latest
|
||||
container_name: rustfs_evening_detective_server
|
||||
environment:
|
||||
RUSTFS_ACCESS_KEY: ${S3_USER}
|
||||
RUSTFS_SECRET_KEY: ${S3_PASSWORD}
|
||||
RUSTFS_CONSOLE_ENABLE: "true"
|
||||
RUSTFS_CONSOLE_ADDRESS: 0.0.0.0:9001
|
||||
RUSTFS_ADDRESS: 0.0.0.0:9000
|
||||
volumes:
|
||||
- rustfs_data:/data
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- app_network
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:9000/health && curl -f http://localhost:9001/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
rustfs_data:
|
||||
Reference in New Issue
Block a user