Giter Club home page Giter Club logo

Comments (4)

EndangeredNayla avatar EndangeredNayla commented on September 22, 2024

I had better luck with a newer docker version the one from docker's own repos.

and changing DEVELOPMENT to PRODUCTION

Cheers

from bracket.

EndangeredNayla avatar EndangeredNayla commented on September 22, 2024

Actually i did switch back to DEVELOPMENT. Try the updated docker tho from docker's official repos not the ubnutu one with this docker compose file.

services:
    bracket-frontend:
        image: ghcr.io/evroon/bracket-frontend
        container_name: bracket-frontend
        ports:
            - "3000:3000"
        environment:
            NEXT_PUBLIC_API_BASE_URL: "http://50.20.249.11:8400"
            # Go to https://dashboard.hcaptcha.com/signup, create a site and put the site key here
            NEXT_PUBLIC_HCAPTCHA_SITE_KEY: "xxxxx"
            NODE_ENV: "production"
        restart: unless-stopped

    bracket-backend:
        image: ghcr.io/evroon/bracket-backend
        container_name: bracket-backend
        ports:
            - "8400:8400"
        environment:
            ENVIRONMENT: "DEVELOPMENT"
            PG_DSN: "postgresql://bracket_dev:bracket_dev@postgres:5432/bracket_dev"
        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

Cheers :)

from bracket.

Cyberlytical-LLC avatar Cyberlytical-LLC commented on September 22, 2024

Thank you for this. So I was able to get the quickstart to work on local host and from another PC. It required adding the CORS orgin to the docker compose under the front end and adding it to .env.development.

However when I try to change to production I get the following error logs:
Field required [type=missing, input_value={'pg_dsn': 'postgresql://...gres:5432/bracket_prod'}, input_type=dict] bracket-backend | For further information visit https://errors.pydantic.dev/2.6/v/missing bracket-backend | [2024-04-09 02:38:15 +0000] [10] [INFO] Worker exiting (pid: 10) bracket-backend | [2024-04-09 02:38:15 +0000] [1] [ERROR] Worker (pid:9) exited with code 3 bracket-backend | [2024-04-09 02:38:15 +0000] [1] [ERROR] Worker (pid:10) was sent SIGTERM! bracket-backend | [2024-04-09 02:38:15 +0000] [1] [ERROR] Shutting down: Master bracket-backend | [2024-04-09 02:38:15 +0000] [1] [ERROR] Reason: Worker failed to boot. bracket-backend | [2024-04-09 02:38:23 +0000] [1] [INFO] Starting gunicorn 21.2.0 bracket-backend | [2024-04-09 02:38:23 +0000] [1] [INFO] Listening at: http://0.0.0.0:8400 (1) bracket-backend | [2024-04-09 02:38:23 +0000] [1] [INFO] Using worker: uvicorn.workers.UvicornWorker bracket-backend | [2024-04-09 02:38:23 +0000] [9] [INFO] Booting worker with pid: 9 bracket-backend | [2024-04-09 02:38:23 +0000] [10] [INFO] Booting worker with pid: 10 bracket-backend | [2024-04-09 02:38:24 +0000] [9] [ERROR] Exception in worker process

### My compose file:
`
services:
bracket-frontend:
image: ghcr.io/evroon/bracket-frontend
container_name: bracket-frontend
ports:
- "3000:3000"
environment:
NEXT_PUBLIC_API_BASE_URL: "http://10.10.3.8:8400"
# Go to https://dashboard.hcaptcha.com/signup, create a site and put the site key here
NEXT_PUBLIC_HCAPTCHA_SITE_KEY: "xxxxx"
NODE_ENV: "production"
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"
    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

`

prod.env (backend)

`PG_DSN='postgresql://bracket_prod:bracket_prod@localhost:5532/bracket_prod'
JWT_SECRET='abd84ebeb6581c26b53fa30d89c4e7fbc48ee5b4f3b8ddedb7586cfeb3daca0c'
CORS_ORIGINS='*'
ADMIN_EMAIL='[email protected]'
ADMIN_PASSWORD='password'
ALLOW_USER_REGISTRATION=true

`

.env.local (frontend)

NEXT_PUBLIC_HCAPTCHA_SITE_KEY='10000000-ffff-ffff-ffff-000000000001' CORS_ORIGINS='*' ANALYTICS_SCRIPT_SRC='' ANALYTICS_DATA_DOMAIN='' ANALYTICS_DATA_WEBSITE_ID=''

I understand some of the fields are still the default. However I have tried changing those values with no luck. I'm not sure what I am doing wrong at this moment. Any help is much appreciated.

from bracket.

Cyberlytical-LLC avatar Cyberlytical-LLC commented on September 22, 2024

Actually I take back the being able to connect part. If its on the same subnet I can log in just fine, however once I move it to my DMZ subnet I can no longer sign in and get the internal error again, even with the CORS ORGIN being set to "*"

from bracket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.