Visitar URL original
Looks like prod.env is not read · Issue #1333 · evroon/bracket · GitHub
Skip to content

Looks like prod.env is not read #1333

Open

Description

@SharkMachine

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

Image

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.

Activity

  1. oscartobar commented on Oct 31, 2025

    @oscartobar

    This version fixes two workarounds:

    1. It uses the latest version of PostgreSQL (18).
    2. 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 the environment setting in your docker-compose.yml file: ENVIRONMENT: "DEVELOPMENT". Restart Docker and then change the environment setting to production. 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: "youuseradmin@hotmail.com"
    			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
       
    
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions