Dockerize Nebula (#31)

* feat: introduce docker and compose

* feat: add public host/port env var

Added `NEBULA_PUBLIC_HOST` and `NEBULA_PUBLIC_PORT` environment variables. Will override config values.

* chore: update compose manifest

Add `NEBULA_PUBLIC_PORT` environment variable for serverlist.
This commit is contained in:
Fishia
2026-04-23 03:09:23 -07:00
committed by GitHub
parent 995f67e86c
commit 8f07ae06d8
6 changed files with 93 additions and 4 deletions
+30
View File
@@ -0,0 +1,30 @@
services:
mongodb:
image: mongo:8.2.7
# https://gist.github.com/maitrungduc1410/f2f7b34d2e736912471b006c6dba17e5
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh mongodb://localhost:27017/nebula --quiet
interval: 5s
timeout: 15s
retries: 3
start_period: 10s
volumes:
- database:/data/db/
restart: unless-stopped
nebula:
build: .
depends_on:
- mongodb
restart: unless-stopped
ports:
- "5000:80"
volumes:
- ./data/:/app/data/
# - ./plugins/:/app/plugins/
# - ./cdn/:/app/web/res
environment:
NEBULA_MONGODB_HOST: mongodb
NEBULA_MONGODB_PORT: 27017
NEBULA_PUBLIC_PORT: 5000
volumes:
database: