101 lines
2.0 KiB
YAML
101 lines
2.0 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: nexusguard
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-nexusguard}
|
|
POSTGRES_DB: nexusguard
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
ports:
|
|
- "127.0.0.1:5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U nexusguard"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
networks:
|
|
- nexusnet
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
command: redis-server --save "" --appendonly no
|
|
volumes:
|
|
- redisdata:/data
|
|
ports:
|
|
- "127.0.0.1:6379:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
networks:
|
|
- nexusnet
|
|
|
|
server-core:
|
|
build:
|
|
context: ./apps/server-core
|
|
dockerfile: Dockerfile
|
|
network_mode: host
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- DB_HOST=127.0.0.1
|
|
- REDIS_ADDR=127.0.0.1:6379
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
cap_add:
|
|
- NET_ADMIN
|
|
- NET_RAW
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
dashboard-ui:
|
|
build:
|
|
context: ./apps/dashboard-ui
|
|
dockerfile: Dockerfile
|
|
args:
|
|
VITE_API_BASE_URL: ${VITE_API_BASE_URL}
|
|
ports:
|
|
- "${WEB_PORT:-80}:80"
|
|
volumes:
|
|
- ./apps/docs/.vitepress/dist:/usr/share/nginx/html/docs:ro
|
|
depends_on:
|
|
- server-core
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
networks:
|
|
- nexusnet
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
|
|
volumes:
|
|
pgdata:
|
|
redisdata:
|
|
|
|
networks:
|
|
nexusnet:
|
|
driver: bridge |