You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been troubleshooting why the Flags on the World Travel page would not load and show as "No image available"
During this, I found that changing Debug=True allows the Images to load, but as soon as it's back to False, they don't work.
This is the same for any images I upload. They will upload without a problem but only display when the server is Debug=True.
I have Aventurelog exposed through a Cloudflare Tunnel
Front: adventurelog.mydomain.com
Back: adventurelogapi.mydomain.com
Provide an obfuscateddocker-compose.yml
services:
web:
#build: ./frontend/
image: ghcr.io/seanmorley15/adventurelog-frontend:latest
container_name: adventurelog-frontend
restart: unless-stopped
environment:
- PUBLIC_SERVER_URL=http://server:8000 # Should be the service name of the backend with port 8000, even if you change the port in the backend service
- ORIGIN=https://adventurelog.mydomain.com
- BODY_SIZE_LIMIT=Infinity
ports:
- 8015:3000
depends_on:
- server
server:
#build: ./backend/
image: ghcr.io/seanmorley15/adventurelog-backend:latest
container_name: adventurelog-backend
restart: unless-stopped
environment:
- DISABLE_REGISTRATION=true
- PGHOST=db
- PGDATABASE=adventurelog
- PGUSER=user
- PGPASSWORD=pass
- SECRET_KEY=secret
- DJANGO_ADMIN_USERNAME=user
- DJANGO_ADMIN_PASSWORD=pass
- DJANGO_ADMIN_EMAIL=[email protected]
- PUBLIC_URL= https://adventurelogapi.mydomain.com # Match the outward port, used for the creation of image urls
- CSRF_TRUSTED_ORIGINS=http://localhost:8015,http://localhost:8016,https://adventurelog.mydomain.com,https://adventurelogapi.mydomain.com # Comma separated list of trusted origins for CSRF
- DEBUG=False
- FRONTEND_URL=https://adventurelog.mydomain.com # Used for email generation. This should be the url of the frontend
ports:
- 8016:80
depends_on:
- db
volumes:
- /mnt/nvme/apps/docker/adventurelog/media:/code/media/
Provide any necessary logs from the containers and browser
The logs don't show any issues but will paste them anyway.
Backend:
Starting nginx: nginx.
PostgreSQL is up - continuing...
Operations to perform:
Apply all migrations: account, admin, adventures, auth, authtoken, contenttypes, integrations, mfa, sessions, sites, socialaccount, users, worldtravel
Running migrations:
No migrations to apply.
Creating superuser...
Superuser already exists.
Latest country, region, and state data already downloaded.
DB:
PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-03-23 06:22:37.115 UTC [1] LOG: starting PostgreSQL 15.4 (Debian 15.4-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2025-03-23 06:22:37.115 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2025-03-23 06:22:37.115 UTC [1] LOG: listening on IPv6 address "::", port 5432
2025-03-23 06:22:37.123 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-03-23 06:22:37.130 UTC [29] LOG: database system was shut down at 2025-03-23 06:22:06 UTC
2025-03-23 06:22:37.136 UTC [1] LOG: database system is ready to accept connections
Explain your issue
I've been troubleshooting why the Flags on the World Travel page would not load and show as "No image available"
During this, I found that changing Debug=True allows the Images to load, but as soon as it's back to False, they don't work.
This is the same for any images I upload. They will upload without a problem but only display when the server is Debug=True.
Visiting https://adventurelogapi.mydomain.com/media/flags/af.png results in a 404 Not found from nginx
I have Aventurelog exposed through a Cloudflare Tunnel
Front: adventurelog.mydomain.com
Back: adventurelogapi.mydomain.com
Provide an obfuscated
docker-compose.yml
services:
web:
#build: ./frontend/
image: ghcr.io/seanmorley15/adventurelog-frontend:latest
container_name: adventurelog-frontend
restart: unless-stopped
environment:
- PUBLIC_SERVER_URL=http://server:8000 # Should be the service name of the backend with port 8000, even if you change the port in the backend service
- ORIGIN=https://adventurelog.mydomain.com
- BODY_SIZE_LIMIT=Infinity
ports:
- 8015:3000
depends_on:
- server
db:
image: postgis/postgis:15-3.3
container_name: adventurelog-db
restart: unless-stopped
environment:
POSTGRES_DB: adventurelog
POSTGRES_USER: user
POSTGRES_PASSWORD: pass
volumes:
- /mnt/nvme/apps/docker/adventurelog/db:/var/lib/postgresql/data/
server:
#build: ./backend/
image: ghcr.io/seanmorley15/adventurelog-backend:latest
container_name: adventurelog-backend
restart: unless-stopped
environment:
- DISABLE_REGISTRATION=true
- PGHOST=db
- PGDATABASE=adventurelog
- PGUSER=user
- PGPASSWORD=pass
- SECRET_KEY=secret
- DJANGO_ADMIN_USERNAME=user
- DJANGO_ADMIN_PASSWORD=pass
- DJANGO_ADMIN_EMAIL=[email protected]
- PUBLIC_URL= https://adventurelogapi.mydomain.com # Match the outward port, used for the creation of image urls
- CSRF_TRUSTED_ORIGINS=http://localhost:8015,http://localhost:8016,https://adventurelog.mydomain.com,https://adventurelogapi.mydomain.com # Comma separated list of trusted origins for CSRF
- DEBUG=False
- FRONTEND_URL=https://adventurelog.mydomain.com # Used for email generation. This should be the url of the frontend
ports:
- 8016:80
depends_on:
- db
volumes:
- /mnt/nvme/apps/docker/adventurelog/media:/code/media/
Provide any necessary logs from the containers and browser
The logs don't show any issues but will paste them anyway.
Backend:
Starting nginx: nginx.
PostgreSQL is up - continuing...
Operations to perform:
Apply all migrations: account, admin, adventures, auth, authtoken, contenttypes, integrations, mfa, sessions, sites, socialaccount, users, worldtravel
Running migrations:
No migrations to apply.
Creating superuser...
Superuser already exists.
Latest country, region, and state data already downloaded.
DB:
PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-03-23 06:22:37.115 UTC [1] LOG: starting PostgreSQL 15.4 (Debian 15.4-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2025-03-23 06:22:37.115 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2025-03-23 06:22:37.115 UTC [1] LOG: listening on IPv6 address "::", port 5432
2025-03-23 06:22:37.123 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-03-23 06:22:37.130 UTC [29] LOG: database system was shut down at 2025-03-23 06:22:06 UTC
2025-03-23 06:22:37.136 UTC [1] LOG: database system is ready to accept connections
Frontend:
The origin to be set is: https://adventurelog.mydomain.com
Listening on 0.0.0.0:3000
The text was updated successfully, but these errors were encountered: