services: nginx: image: nginx:alpine container_name: sentinel-nginx network_mode: host restart: unless-stopped depends_on: - sentinel-app volumes: - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro - ./frontend/dist:/etc/nginx/html/admin/ui:ro sentinel-app: image: key-ip-sentinel:latest container_name: sentinel-app restart: unless-stopped env_file: - .env volumes: - ./app:/app/app:ro depends_on: - redis - postgres networks: sentinel-net: ipv4_address: 172.30.0.10 shared_network: redis: image: redis:7-alpine container_name: sentinel-redis restart: unless-stopped command: [ "sh", "-c", "if [ -n \"$REDIS_PASSWORD\" ]; then exec redis-server --requirepass \"$REDIS_PASSWORD\"; else exec redis-server; fi" ] env_file: - .env volumes: - redis_data:/data networks: - sentinel-net postgres: image: postgres:16 container_name: sentinel-postgres restart: unless-stopped environment: POSTGRES_USER: sentinel POSTGRES_PASSWORD: password POSTGRES_DB: sentinel volumes: - pg_data:/var/lib/postgresql/data - ./db/init.sql:/docker-entrypoint-initdb.d/init.sql:ro networks: - sentinel-net volumes: redis_data: pg_data: networks: sentinel-net: driver: bridge ipam: config: - subnet: 172.30.0.0/24 shared_network: external: true