55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
services:
|
|
rvote:
|
|
build:
|
|
context: ..
|
|
dockerfile: rvote-online/Dockerfile
|
|
restart: unless-stopped
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.rvote.rule=Host(`rvote.online`) || Host(`www.rvote.online`) || HostRegexp(`{subdomain:[a-z0-9-]+}.rvote.online`)"
|
|
- "traefik.http.routers.rvote.entrypoints=web"
|
|
- "traefik.http.services.rvote.loadbalancer.server.port=3000"
|
|
- "traefik.docker.network=traefik-public"
|
|
environment:
|
|
- DATABASE_URL=postgresql://rvote:${DB_PASSWORD}@postgres:5432/rvote
|
|
- ENCRYPTID_SERVER_URL=https://encryptid.jeffemmett.com
|
|
- NEXT_PUBLIC_ENCRYPTID_SERVER_URL=https://encryptid.jeffemmett.com
|
|
- SMTP_HOST=${SMTP_HOST:-mail.rmail.online}
|
|
- SMTP_PORT=${SMTP_PORT:-587}
|
|
- SMTP_USER=${SMTP_USER:-noreply@rmail.online}
|
|
- SMTP_PASS=${SMTP_PASS}
|
|
- ROOT_DOMAIN=rvote.online
|
|
- NEXT_PUBLIC_ROOT_DOMAIN=rvote.online
|
|
networks:
|
|
- traefik-public
|
|
- rvote-internal
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_USER=rvote
|
|
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
|
- POSTGRES_DB=rvote
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- rvote-internal
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U rvote -d rvote"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
networks:
|
|
traefik-public:
|
|
external: true
|
|
rvote-internal:
|
|
internal: true
|
|
|
|
volumes:
|
|
postgres_data:
|