- deploy/nginx/ghl.cast.ph.conf: Nginx reverse proxy with SSL (Let's Encrypt) - deploy/setup-server.sh: one-shot Ubuntu VPS bootstrap (Docker, Nginx, Certbot, UFW) - deploy/deploy.sh: pull-and-redeploy script using Docker Compose - docker-compose.yaml: bind bridge to 127.0.0.1 only; add Mongo healthcheck; bridge waits for Mongo healthy before starting Co-Authored-By: Paperclip <noreply@paperclip.ing>
33 lines
723 B
YAML
33 lines
723 B
YAML
services:
|
|
bridge:
|
|
build: .
|
|
# Bind to localhost only — Nginx proxies from outside
|
|
ports:
|
|
- "127.0.0.1:${PORT:-3002}:${PORT:-3002}"
|
|
env_file: .env
|
|
depends_on:
|
|
mongo:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
mongo:
|
|
image: mongo:7
|
|
# No ports exposed — only reachable by bridge on the internal network
|
|
volumes:
|
|
- mongo-data:/data/db
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 20s
|
|
|
|
volumes:
|
|
mongo-data:
|