2.8 KiB · text History a4db355
services:
  postgres:
    image: postgres:17
    container_name: recourse_postgres
    ports:
      - 5439:5432
    environment:
      POSTGRES_DB: recourse
      POSTGRES_USER: recourse_user
      POSTGRES_PASSWORD: recourse_password
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U recourse_user -d recourse"]
      interval: 5s
      timeout: 3s
      retries: 10

  webservice:
    build:
      context: .
    image: recourse:local
    container_name: recourse_webservice
    depends_on:
      postgres: { condition: service_healthy }
    environment:
      DATABASE_URL: postgres://recourse_user:recourse_password@postgres:5432/recourse
      BIND_ADDRESS: 0.0.0.0:3000
      AUTO_MIGRATE: "true"
      REGISTRATION_ENABLED: "false"
      # Set to the public origin so the API-token curl example is correct
      # behind a reverse proxy. Leave unset for LAN access.
      # Also the base of email-verification links and the OIDC redirect URI.
      # PUBLIC_URL: https://recourse.example.com
      #
      # Behind nginx proxy_pass or a cluster ingress: the proxies whose
      # X-Forwarded-For is believed (comma-separated CIDRs). Unset: none, and
      # every request is from the proxy's address. Client addresses are kept
      # IP_RETENTION_DAYS (staff only; README "Client addresses").
      # TRUSTED_PROXIES: 127.0.0.1/32,10.0.0.0/8
      # IP_RETENTION_DAYS: "180"
      #
      # Email verification mail through mail-prism. Unset: links are only
      # written to this container's log (development).
      # MAIL_PRISM_URL: http://mail-prism-svc.mail-prism
      # MAIL_PRISM_API_KEY: mp_...
      # MAIL_FROM_ADDRESS: recourse@neiam.co   # must equal the key's application address
      # MAIL_FROM_NAME: recourse
      # EMAIL_VERIFICATION_TTL_HOURS: "48"
      # REQUIRE_EMAIL_VERIFICATION: "true"
      #
      # "Sign in with NEIAM" (neiam-auth), off unless OIDC_ENABLED=true. The
      # oidc_identities migration runs regardless, so turning it on later
      # needs no schema change.
      # OIDC_ENABLED: "true"
      # OIDC_LOGIN_MODE: mixed                  # local | mixed | sso | sso_strict
      # OIDC_ISSUER: https://auth.neiam.org
      # OIDC_CLIENT_ID: recourse
      # OIDC_CLIENT_SECRET: change-me          # or OIDC_CLIENT_SECRET_FILE
      # OIDC_REDIRECT_URI: http://localhost:3000/auth/oidc/neiam/callback
      # OIDC_SCOPES: openid profile email groups
      # OIDC_GROUPS_CLAIM: groups
      # OIDC_TRUST_EMAIL: "true"               # only for a provider whose emails you control
      # OIDC_LABEL: Sign in with NEIAM
      # OIDC_LOGOUT_URL: https://auth.neiam.org/logout
      # OIDC_PROVISION: invite_only            # or `auto`: create accounts on first login
      # OIDC_PASSWORD_LOGIN: "false"           # hide the password form
    ports:
      - 3000:3000

volumes:
  postgres_data: