rtrips-online/docker-compose.yml

72 lines
2.1 KiB
YAML

services:
rtrips:
build:
context: ..
dockerfile: rtrips-online/Dockerfile
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://auth.ridentity.online}
- RNOTES_INTERNAL_URL=${RNOTES_INTERNAL_URL:-http://rnotes-online:3000}
- RVOTE_INTERNAL_URL=${RVOTE_INTERNAL_URL:-http://rvote-online-rvote-1:3000}
- RCART_INTERNAL_URL=${RCART_INTERNAL_URL:-http://rcart-online:3000}
labels:
- "traefik.enable=true"
- "traefik.http.routers.rtrips.rule=Host(`rtrips.online`) || Host(`www.rtrips.online`) || HostRegexp(`{subdomain:[a-z0-9-]+}.rtrips.online`)"
- "traefik.http.routers.rtrips.priority=130"
- "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: