mirror of
https://github.com/nimbusdotstorage/Nimbus
synced 2026-04-22 17:45:03 +02:00
122 lines
2.9 KiB
YAML
122 lines
2.9 KiB
YAML
services:
|
|
# Database Service
|
|
db:
|
|
image: postgres:16
|
|
container_name: nimbus-db
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- nimbus-network
|
|
|
|
# Cache Service
|
|
cache:
|
|
image: valkey/valkey:latest
|
|
container_name: nimbus-cache
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
environment:
|
|
VALKEY_USERNAME: ${VALKEY_USERNAME}
|
|
VALKEY_PASSWORD: ${VALKEY_PASSWORD}
|
|
ports:
|
|
- "6379:6379"
|
|
command:
|
|
[
|
|
"valkey-server",
|
|
"--requirepass",
|
|
"${VALKEY_PASSWORD}",
|
|
"--user",
|
|
"${VALKEY_USERNAME}",
|
|
"on",
|
|
"+@all",
|
|
"~*",
|
|
">valkey",
|
|
"--appendonly",
|
|
"yes",
|
|
]
|
|
volumes:
|
|
- valkey-data:/data
|
|
healthcheck:
|
|
test: ["CMD", "valkey-cli", "-a", "${VALKEY_PASSWORD}", "ping"]
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 5
|
|
networks:
|
|
- nimbus-network
|
|
|
|
# # Server Service
|
|
# server:
|
|
# build:
|
|
# context: .
|
|
# dockerfile: apps/server/Dockerfile
|
|
# target: runner
|
|
# container_name: nimbus-server
|
|
# restart: unless-stopped
|
|
# env_file: .env
|
|
# environment:
|
|
# NODE_ENV: production
|
|
# PORT: ${SERVER_PORT:-1284}
|
|
# DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
|
|
# # Valkey connection settings with username/password
|
|
# VALKEY_HOST: ${VALKEY_HOST}
|
|
# VALKEY_PORT: ${VALKEY_PORT}
|
|
# VALKEY_USERNAME: ${VALKEY_USERNAME}
|
|
# VALKEY_PASSWORD: ${VALKEY_PASSWORD}
|
|
# # Connection URL format with username and password
|
|
# VALKEY_URL: valkey://${VALKEY_USERNAME}:${VALKEY_PASSWORD}@${VALKEY_HOST}:${VALKEY_PORT}/0
|
|
# ports:
|
|
# - "1284:1284"
|
|
# depends_on:
|
|
# db:
|
|
# condition: service_healthy
|
|
# cache:
|
|
# condition: service_healthy
|
|
# networks:
|
|
# - nimbus-network
|
|
|
|
# # Web Service
|
|
# web:
|
|
# build:
|
|
# context: .
|
|
# dockerfile: apps/web/Dockerfile
|
|
# target: runner
|
|
# args:
|
|
# VITE_BACKEND_URL: ${VITE_BACKEND_URL}
|
|
# VITE_FRONTEND_URL: ${VITE_FRONTEND_URL}
|
|
# container_name: nimbus-web
|
|
# restart: unless-stopped
|
|
# env_file: .env
|
|
# environment:
|
|
# NODE_ENV: production
|
|
# VITE_BACKEND_URL: ${VITE_BACKEND_URL}
|
|
# VITE_FRONTEND_URL: ${VITE_FRONTEND_URL}
|
|
# ports:
|
|
# - "3000:3000"
|
|
# depends_on:
|
|
# server:
|
|
# condition: service_started
|
|
# networks:
|
|
# - nimbus-network
|
|
|
|
volumes:
|
|
postgres-data:
|
|
name: nimbus-postgres-data
|
|
valkey-data:
|
|
name: nimbus-valkey-data
|
|
|
|
networks:
|
|
nimbus-network:
|
|
driver: bridge
|