bracket
bracket copied to clipboard
Looks like prod.env is not read
I followed your guide at https://docs.bracketapp.nl/docs/running-bracket/configuration/ but it seems it isn't reading prod.env at all.
When I try to login, it gives me internal server error and I can see the following error in Firefox
The logs tell me the folowing
bracket-backend | pydantic_core._pydantic_core.ValidationError: 1 validation error for ProductionConfig
bracket-backend | jwt_secret
bracket-backend | Field required [type=missing, input_value={'cors_origins': 'http://...tgres:5432/bracket_dev'}, input_type=dict]
bracket-backend | For further information visit https://errors.pydantic.dev/2.11/v/missing
Could I get some help with this? CORS_ORIGINS is set in prod.env.
This version fixes two workarounds:
- It uses the latest version of PostgreSQL (18).
- There is a bug in production that, when creating an empty database, generates the error:
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedObject) index "ix_users_email" does not exist. To fix this, you only need to change theenvironmentsetting in yourdocker-compose.ymlfile:ENVIRONMENT: "DEVELOPMENT". Restart Docker and then change theenvironmentsetting toproduction. It should then start normally.
services:
bracket-frontend:
image: ghcr.io/evroon/bracket-frontend
container_name: bracket-frontend
ports:
- "3000:3000"
environment:
NODE_ENV: "production"
NEXT_PUBLIC_API_BASE_URL: "https://yoursite.com:8400"
NEXT_PUBLIC_HCAPTCHA_SITE_KEY: "10000000-ffff-ffff-ffff-000000000001"
restart: unless-stopped
bracket-backend:
image: ghcr.io/evroon/bracket-backend
container_name: bracket-backend
ports:
- "8400:8400"
environment:
ENVIRONMENT: "PRODUCTION"
PG_DSN: "postgresql://bracket_prod:bracket_prod@postgres:5432/bracket_prod"
CORS_ORIGINS: https://yoursite.com
JWT_SECRET: "-write here---openssl rand -hex 32--------"
ADMIN_EMAIL: "[email protected]"
ADMIN_PASSWORD: "youpasswordadmin"
volumes:
- ./backend/static:/app/static
restart: unless-stopped
depends_on:
- postgres
postgres:
image: postgres
restart: always
environment:
POSTGRES_DB: bracket_prod
POSTGRES_USER: bracket_prod
POSTGRES_PASSWORD: bracket_prod
volumes:
- ./postgres:/var/lib/postgresql