Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request - add to dockerhub #916

Open
zer0ish opened this issue Sep 17, 2024 · 8 comments
Open

Request - add to dockerhub #916

zer0ish opened this issue Sep 17, 2024 · 8 comments
Labels

Comments

@zer0ish
Copy link

zer0ish commented Sep 17, 2024

I would like to request this to be added to dockerhub for ease of use with Unraid.

I have no idea how to create a docker image or container (trying to learn).

Thanks.

@evroon
Copy link
Owner

evroon commented Sep 20, 2024

so you can't use the ones from Github container registry (GHCR): https://github.com/evroon?tab=packages&repo_name=bracket?

@zer0ish
Copy link
Author

zer0ish commented Sep 20, 2024

I've been trying to make a production setup.

I can run the quickstart version from a linux VM but can't connect to it remotely through my reverse proxy.
Unraid uses dockerhub to pull the images and then I would populate the environmental variables.

I tried using the compose plugin for unraid. I used what I imagine is the a proper docker-compose.yml and it manages to pull the 3 images, frontend, backend, postgres. The front end works but I can't login with the quickstart info or the Admin email and password I set in the docker-sompose file. I'm not 100% sure it's correct.

I tried having the back and front end have their own subdomain;
Frontend: bracket.mysite.net
Backend: bracket-api.mysite.net

I also tried using their local IP since this has worked for other services I host on my server that require a frontend backend setup such as openldap and it's password recovery and reset frontend.

But it seems they dont want to talk together.
The share for the backend is empty but the postgres one gets populated.

I copied the exact template from the Docker section in the documentation and made the changes to include the admin login and the other required configuration for production.

It would be great to have all 3; frontend, backend and postgres, all built into one image.

I'm still trying to figure out how to make docker images.

I'd love to help write a guide on getting this working on Unraid docker with a Production setup.
I'll keep working at it but having a single image with the 3 components might help, especially if it's pre-configured with as production with a default admin account that can be changed once logged into.

Again, I'm still learning all this stuff so I could be missing something simple to get it working.

@evroon
Copy link
Owner

evroon commented Sep 21, 2024

The problem is most likely that the environment variables are not set currently. Could you send your docker-compose.yml file?

Especially the CORS and backend base url environment variables have to be set correctly.

If they are correct, could you check the network tab of the browser console to see where the frontend is sending requests to?

@zer0ish
Copy link
Author

zer0ish commented Sep 21, 2024

Sure,

This is my yml file. I've since tried many other variations with local IP hoping it would work like my openldap/password recover site works, but no dice on that. I even installed a VM of PoP!_OS with docker-compose and that seems to be working with the Quickstart. But only locally, not remotely even though I can access the front end remotely I get the "Internal Server error" at the bottom right.

I guess I should add more context, that the remote stuff is going through Nginx Reverse Proxy docker, that all gets proxied to Cloudflare.

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://bracket-api.mydomain.net"
            NEXT_PUBLIC_HCAPTCHA_SITE_KEY:
        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://bracket.mydomain.net"
            JWT_SECRET: d01d48d899b2f9d8baaf9cd4ed533af5f7391c2c4e9dc2cf68a67b0265c2d97f
            ADMIN_EMAIL: admin@mydomain.net
            ADMIN_PASSWORD: testpassword
            ALLOW_INSECURE_HTTP_SSO: false
        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/data

I wont have time this weekend to work on this so, next time I have time, Ill reconfigure everything and try again and provide the browser console stuff.

@zer0ish
Copy link
Author

zer0ish commented Sep 22, 2024

Found some time to retry with the domain name instead of IP in my linux install with the quickstart and when trying to login remotely I get this, I can only login locally:
image

I'm not sure where it's getting "localhost:8400" from when the yml has domains listed.

Haven't had time to test the docker production one I posted above.

@evroon
Copy link
Owner

evroon commented Sep 23, 2024

and this is the latest version of bracket? Because there were problems with environment variables in the frontend that I fixed only a few weeks ago

@zer0ish
Copy link
Author

zer0ish commented Sep 24, 2024

This Quickstart setup was pulled on Sunday, September 22, so I assume it pulled the latest using these commands:

git clone git@github.com:evroon/bracket.git
cd bracket
sudo docker compose up -d

I wanna make sure this is accessible remotely before I commit allot of time trying to get production setup going.
I'm not sure the quickstart pull can work remotely?

Unless you have a preset production yml file that works remotely. I can try to run it by just changing the CORS and backend base url.

Copy link
Contributor

This issue is stale because it has been open for 60 days with no activity. What is the action to take here?

@github-actions github-actions bot added the Stale label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants