Files
Nexus-Guard-Suite/docker-compose.yml
T
2026-05-15 05:34:55 +07:00

72 lines
1.5 KiB
YAML

version: '3.8'
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: nexusguard
POSTGRES_PASSWORD: ${DB_PASSWORD:-nexusguard}
POSTGRES_DB: nexusguard
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U nexusguard"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
networks:
- nexusnet
redis:
image: redis:7-alpine
volumes:
- redisdata:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
networks:
- nexusnet
server-core:
build:
context: ./apps/server-core
dockerfile: Dockerfile
environment:
- DB_HOST=postgres
- DB_PORT=5432
- DB_USER=nexusguard
- DB_PASSWORD=${DB_PASSWORD:-nexusguard}
- DB_NAME=nexusguard
- REDIS_ADDR=redis:6379
- JWT_SECRET=${JWT_SECRET:-changeme}
- SERVER_SALT=${SERVER_SALT:-changeme}
- NFTABLES_TABLE=nexusguard
- IPAM_POOL=10.8.0.0/16
- GIN_MODE=release
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
# Requires NET_ADMIN capability for nftables manipulation
cap_add:
- NET_ADMIN
- NET_RAW
restart: unless-stopped
networks:
- nexusnet
volumes:
pgdata:
redisdata:
networks:
nexusnet:
driver: bridge