You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.3 KiB
42 lines
1.3 KiB
services: |
|
gitrepublic: |
|
build: |
|
context: . |
|
dockerfile: Dockerfile |
|
container_name: gitrepublic-web |
|
# For localhost: expose port directly |
|
ports: |
|
- "${PORT:-6543}:6543" |
|
# For production behind reverse proxy: comment out ports above and use expose instead |
|
# expose: |
|
# - "6543" # Internal only, accessed via reverse proxy |
|
environment: |
|
- NODE_ENV=production |
|
- GIT_REPO_ROOT=/repos |
|
- GIT_DOMAIN=${GIT_DOMAIN:-localhost:6543} # Set to your domain for production |
|
- NOSTR_RELAYS=${NOSTR_RELAYS:-wss://relay.damus.io,wss://nostr.wine,wss://nos.lol} |
|
- NOSTRGIT_SECRET_KEY=${NOSTRGIT_SECRET_KEY:-} |
|
- PORT=6543 |
|
volumes: |
|
# Persist git repositories |
|
- ./repos:/repos |
|
# Optional: persist audit logs |
|
# - ./logs:/app/logs |
|
# Optional: mount config file if needed |
|
# - ./config:/app/config:ro |
|
restart: unless-stopped |
|
healthcheck: |
|
test: ["CMD", "node", "-e", "require('http').get('http://localhost:6543', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"] |
|
interval: 30s |
|
timeout: 3s |
|
retries: 3 |
|
start_period: 10s |
|
# Resource limits (adjust as needed) |
|
deploy: |
|
resources: |
|
limits: |
|
cpus: '2' |
|
memory: 2G |
|
reservations: |
|
cpus: '1' |
|
memory: 1G
|
|
|