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

[BUG] Port 8000 required but not documented (docker-compose) #433

Open
perry-mitchell opened this issue Jan 10, 2025 · 1 comment
Open
Labels
bug Something isn't working

Comments

@perry-mitchell
Copy link

perry-mitchell commented Jan 10, 2025

Describe the bug
Following the linked docker-compose example, I've setup both front-end and back-end containers. The ports 8015 and 8016 are mentioned, but not 8000, which seems to be required.

Logs:

adventurelog-5d4984469c-ftblk The origin to be set is: http://<my-domain>.ts.net
adventurelog-5d4984469c-ftblk Listening on 0.0.0.0:3000
adventurelog-5d4984469c-ftblk TypeError: fetch failed
adventurelog-5d4984469c-ftblk     at node:internal/deps/undici/undici:12618:11
adventurelog-5d4984469c-ftblk     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
adventurelog-5d4984469c-ftblk     at async fetchCSRFToken (file:///app/build/server/chunks/index.server-CBG1QNm5.js:4:26)
adventurelog-5d4984469c-ftblk     at async default (file:///app/build/server/chunks/11-DShrFDs1.js:28:23)
adventurelog-5d4984469c-ftblk     at async handle_action_json_request (file:///app/build/server/index.js:992:18)
adventurelog-5d4984469c-ftblk     at async resolve2 (file:///app/build/server/index.js:3715:24)
adventurelog-5d4984469c-ftblk     at async i18nHook (file:///app/build/server/chunks/hooks.server-DhCGhSN5.js:95:12)
adventurelog-5d4984469c-ftblk     at async themeHook (file:///app/build/server/chunks/hooks.server-DhCGhSN5.js:90:10)
adventurelog-5d4984469c-ftblk     at async authHook (file:///app/build/server/chunks/hooks.server-DhCGhSN5.js:38:14)
adventurelog-5d4984469c-ftblk     at async respond (file:///app/build/server/index.js:3607:22) {
adventurelog-5d4984469c-ftblk   cause: Error: connect ECONNREFUSED ::1:8000
adventurelog-5d4984469c-ftblk       at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
adventurelog-5d4984469c-ftblk     errno: -111,
adventurelog-5d4984469c-ftblk     code: 'ECONNREFUSED',
adventurelog-5d4984469c-ftblk     syscall: 'connect',
adventurelog-5d4984469c-ftblk     address: '::1',
adventurelog-5d4984469c-ftblk     port: 8000
adventurelog-5d4984469c-ftblk   }
adventurelog-5d4984469c-ftblk }
adventurelog-5d4984469c-ftblk TypeError: fetch failed
adventurelog-5d4984469c-ftblk     at node:internal/deps/undici/undici:12618:11
adventurelog-5d4984469c-ftblk     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
adventurelog-5d4984469c-ftblk     at async fetchCSRFToken (file:///app/build/server/chunks/index.server-CBG1QNm5.js:4:26)
adventurelog-5d4984469c-ftblk     at async default (file:///app/build/server/chunks/11-DShrFDs1.js:28:23)
adventurelog-5d4984469c-ftblk     at async handle_action_json_request (file:///app/build/server/index.js:992:18)
adventurelog-5d4984469c-ftblk     at async resolve2 (file:///app/build/server/index.js:3715:24)
adventurelog-5d4984469c-ftblk     at async i18nHook (file:///app/build/server/chunks/hooks.server-DhCGhSN5.js:95:12)
adventurelog-5d4984469c-ftblk     at async themeHook (file:///app/build/server/chunks/hooks.server-DhCGhSN5.js:90:10)
adventurelog-5d4984469c-ftblk     at async authHook (file:///app/build/server/chunks/hooks.server-DhCGhSN5.js:38:14)
adventurelog-5d4984469c-ftblk     at async respond (file:///app/build/server/index.js:3607:22) {
adventurelog-5d4984469c-ftblk   cause: Error: connect ECONNREFUSED ::1:8000
adventurelog-5d4984469c-ftblk       at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
adventurelog-5d4984469c-ftblk     errno: -111,
adventurelog-5d4984469c-ftblk     code: 'ECONNREFUSED',
adventurelog-5d4984469c-ftblk     syscall: 'connect',
adventurelog-5d4984469c-ftblk     address: '::1',
adventurelog-5d4984469c-ftblk     port: 8000
adventurelog-5d4984469c-ftblk   }
adventurelog-5d4984469c-ftblk }

Running this on k3s. The only relevant config for the front-end container are the env variables:

ORIGIN = http://<my-domain>.ts.net
BODY_SIZE_LIMIT = "Infinity"

What is port 8000? We have 8015 for the front-end, and 8016 for the backend - which service is this port intended for, and how can we override it?

@perry-mitchell perry-mitchell added the bug Something isn't working label Jan 10, 2025
@seanmorley15
Copy link
Owner

seanmorley15 commented Jan 11, 2025

Hi! Port 8000 is for the internal communication between the Nginx service and the Django service. This port does not need to be exposed because only Nginx is exposed in the container and handles routing to Django or static files accordingly. I would double check your PUBLIC_SERVER_URL, it should most likely be https://serveraddress:8016. Let me know how this goes. If this does not work I would try http://server:8000 as a second option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants