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: 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