services: rtrips: build: . container_name: rtrips-online restart: unless-stopped environment: - DATABASE_URL=postgresql://rtrips:${DB_PASSWORD}@rtrips-postgres:5432/rtrips - GEMINI_API_KEY=${GEMINI_API_KEY} - NEXT_PUBLIC_RSPACE_URL=${NEXT_PUBLIC_RSPACE_URL:-https://rspace.online} - RSPACE_INTERNAL_URL=${RSPACE_INTERNAL_URL:-http://rspace-online:3000} - NEXT_PUBLIC_ENCRYPTID_SERVER_URL=${NEXT_PUBLIC_ENCRYPTID_SERVER_URL:-https://encryptid.jeffemmett.com} labels: - "traefik.enable=true" - "traefik.http.routers.rtrips.rule=Host(`rtrips.online`) || Host(`www.rtrips.online`)" - "traefik.http.services.rtrips.loadbalancer.server.port=3000" networks: - traefik-public - rtrips-internal depends_on: rtrips-postgres: condition: service_healthy cap_drop: - ALL security_opt: - no-new-privileges:true read_only: true tmpfs: - /tmp - /home/nextjs/.npm rtrips-postgres: image: postgres:16-alpine container_name: rtrips-postgres restart: unless-stopped environment: - POSTGRES_USER=rtrips - POSTGRES_PASSWORD=${DB_PASSWORD} - POSTGRES_DB=rtrips volumes: - postgres_data:/var/lib/postgresql/data networks: - rtrips-internal healthcheck: test: ["CMD-SHELL", "pg_isready -U rtrips -d rtrips"] interval: 5s timeout: 5s retries: 5 cap_drop: - ALL cap_add: - DAC_OVERRIDE - FOWNER - SETGID - SETUID security_opt: - no-new-privileges:true networks: traefik-public: external: true rtrips-internal: internal: true volumes: postgres_data: