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

[DEPLOYMENT] /admin/-Page not accessible #463

Closed
randombenny opened this issue Jan 22, 2025 · 5 comments
Closed

[DEPLOYMENT] /admin/-Page not accessible #463

randombenny opened this issue Jan 22, 2025 · 5 comments
Labels
deployment Issues related to deploying AdventureLog

Comments

@randombenny
Copy link

Explain your issue

Tried installing adventurelog like this. I also tried the compose mady by mariushosting. I am running Docker on a Synology Diskstation.
Logging in works, registering works, blocking new registrations does not work yet - which i wanted to try using the Adminpanel. Opening the Adminpanel i get a 404-response.

Provide an obfuscated docker-compose.yml

services:
web:
#build: ./frontend/
image: ghcr.io/seanmorley15/adventurelog-frontend:latest
container_name: adventurelog-frontend
restart: on-failure:5
environment:
- PUBLIC_SERVER_URL=http://server:8000
- ORIGIN=https://domain.de
- BODY_SIZE_LIMIT=Infinity
ports:
- "8015:3000"
depends_on:
- server

db:
image: postgis/postgis:15-3.3
container_name: adventurelog-db
restart: on-failure:5
environment:
POSTGRES_DB: database
POSTGRES_USER: adventurelog
POSTGRES_PASSWORD: postgrespass
volumes:
- /volume3/docker/adventurelog/postgres_data:/var/lib/postgresql/data/

server:
#build: ./backend/
image: ghcr.io/seanmorley15/adventurelog-backend:latest
container_name: adventurelog-backend
restart: unless-stopped
environment:
- PGHOST=db
- PGDATABASE=database
- PGUSER=adventurelog
- PGPASSWORD=postgrespass
- SECRET_KEY=muchosecret
- DJANGO_ADMIN_USERNAME=admin
- DJANGO_ADMIN_PASSWORD=adminpw
- DJANGO_ADMIN_EMAIL=[email protected]
- PUBLIC_URL=https://domain.de
- CSRF_TRUSTED_ORIGINS=http://localhost:8016,http://localhost:8015,https://domain.de
- DEBUG=False
- FRONTEND_URL=http://localhost:8015
ports:
- "8016:80"
depends_on:
- db
volumes:
- /volume3/docker/adventurelog/adventurelog_media:/code/media/

volumes:
postgres_data:
adventurelog_media:

Provide any necessary logs from the containers and browser

2025/01/22 14:58:09 | stderr | }
2025/01/22 14:58:09 | stderr | text: 'Not Found'
2025/01/22 14:58:09 | stderr | status: 404,
2025/01/22 14:58:09 | stderr | at authHook (file:///app/build/server/chunks/hooks.server-B9jJ9cmg.js:82:16) {
2025/01/22 14:58:09 | stderr | at resolve (file:///app/build/server/chunks/hooks.server-B9jJ9cmg.js:22:35)
2025/01/22 14:58:09 | stderr | at apply_handle (file:///app/build/server/chunks/hooks.server-B9jJ9cmg.js:8:14)
2025/01/22 14:58:09 | stderr | at themeHook (file:///app/build/server/chunks/hooks.server-B9jJ9cmg.js:91:16)
2025/01/22 14:58:09 | stderr | at resolve (file:///app/build/server/chunks/hooks.server-B9jJ9cmg.js:22:35)
2025/01/22 14:58:09 | stderr | at apply_handle (file:///app/build/server/chunks/hooks.server-B9jJ9cmg.js:8:14)
2025/01/22 14:58:09 | stderr | at i18nHook (file:///app/build/server/chunks/hooks.server-B9jJ9cmg.js:96:18)
2025/01/22 14:58:09 | stderr | at resolve (file:///app/build/server/chunks/hooks.server-B9jJ9cmg.js:26:16)
2025/01/22 14:58:09 | stderr | at resolve (file:///app/build/server/index.js:3609:34)
2025/01/22 14:58:09 | stderr | at resolve2 (file:///app/build/server/index.js:3776:18)
2025/01/22 14:58:09 | stderr | SvelteKitError: Not found: /admin/
2025/01/22 14:57:18 | stdout | Listening on 0.0.0.0:3000
2025/01/22 14:57:18 | stdout | The origin to be set is: https://domain.de

@randombenny randombenny added the deployment Issues related to deploying AdventureLog label Jan 22, 2025
@seanmorley15
Copy link
Owner

Hi! Make sure you are accessing /admin on the server URL, not the frontend app url. Let me know if that helps!

@randombenny
Copy link
Author

randombenny commented Jan 23, 2025

That helped with this part of the problem, thank you very much. I tried to reach the frontend container.

The other issue is that i set DISABLE_REGISTRATION=true as environment which did not work for me - anyone visiting my page is still able to create new users. Is there any setting i did not find?

Edit: The linked Admin-Page in superuser-settings still leads to a 404-page. Is it possible to change the link to the actual endpoint?

@seanmorley15
Copy link
Owner

seanmorley15 commented Jan 23, 2025

Hi! For disable registration, make sure its set to DISABLE_REGISTRATION=True in the backend (note uppercase T for True). The super user settings page link is generated from the PUBLIC_URL variable in the backend so this can be adjusted accordingly to be the public backend url.

@randombenny
Copy link
Author

Works perfectly now, user-related problem. Thank you for your patience!
Can't wait to use it on our next trips :)

@seanmorley15
Copy link
Owner

Glad to hear! Hope you enjoy 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment Issues related to deploying AdventureLog
Projects
None yet
Development

No branches or pull requests

2 participants