01What AdventureLog is and why I like it
02The three services you are actually running
03The Compose file
1services: 2 web: 3 image: ghcr.io/seanmorley15/adventurelog-frontend:latest4 restart: unless-stopped5 environment: 6 PUBLIC_SERVER_URL: ${PUBLIC_SERVER_URL:-http://server:8000}7 ORIGIN: ${FRONTEND_URL:-http://localhost:8015}8 BODY_SIZE_LIMIT: ${BODY_SIZE_LIMIT:-Infinity}9 ports: 10 - "${FRONTEND_PORT:-8015}:3000"11 depends_on: 12 - server1314 server: 15 image: ghcr.io/seanmorley15/adventurelog-backend:latest16 restart: unless-stopped17 environment: 18 PGHOST: postgresql19 PGDATABASE: ${POSTGRES_DB:-database}20 PGUSER: ${POSTGRES_USER:-adventure}21 PGPASSWORD: ${POSTGRES_PASSWORD:-change-me}22 SECRET_KEY: ${SECRET_KEY:-change-me-secret-key}23 DJANGO_ADMIN_USERNAME: ${DJANGO_ADMIN_USERNAME:-admin}24 DJANGO_ADMIN_PASSWORD: ${DJANGO_ADMIN_PASSWORD:-change-me-admin}25 DJANGO_ADMIN_EMAIL: ${DJANGO_ADMIN_EMAIL:-admin@localhost}26 PUBLIC_URL: ${PUBLIC_URL:-http://localhost:8016}27 CSRF_TRUSTED_ORIGINS: ${CSRF_TRUSTED_ORIGINS:-http://localhost:8016,http://localhost:8015}28 FRONTEND_URL: ${FRONTEND_URL:-http://localhost:8015}29 DEBUG: ${DEBUG:-False}30 ports: 31 - "${BACKEND_PORT:-8016}:80"32 depends_on: 33 postgresql: 34 condition: service_healthy35 volumes: 36 - adventurelog_media:/code/media/3738 postgresql: 39 image: postgis/postgis:16-3.540 restart: unless-stopped41 environment: 42 POSTGRES_DB: ${POSTGRES_DB:-database}43 POSTGRES_USER: ${POSTGRES_USER:-adventure}44 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change-me}45 healthcheck: 46 test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]47 interval: 10s48 timeout: 5s49 retries: 1050 volumes: 51 - postgres_data:/var/lib/postgresql/data/5253volumes: 54 postgres_data: 55 adventurelog_media: 5604Getting the URL variables right
1FRONTEND_URL=https://travel.example.com2PUBLIC_URL=https://travel-api.example.com3PUBLIC_SERVER_URL=http://server:80004CSRF_TRUSTED_ORIGINS=https://travel.example.com,https://travel-api.example.com5POSTGRES_DB=database6POSTGRES_USER=adventure7POSTGRES_PASSWORD=replace-with-a-long-random-value8SECRET_KEY=replace-with-another-long-random-value9DJANGO_ADMIN_USERNAME=admin10DJANGO_ADMIN_PASSWORD=replace-with-a-third-random-value11DJANGO_ADMIN_EMAIL=admin@example.com12DEBUG=False13Do not leave POSTGRES_PASSWORD, SECRET_KEY or DJANGO_ADMIN_PASSWORD at the placeholder defaults on anything reachable by other people. Also remember that POSTGRES_PASSWORD only takes effect when the database volume is first created; changing it later will make the backend fail to connect.
05Starting it and logging in
1docker compose up -d2docker compose ps3docker compose logs -f server4The admin user is only created the first time the backend starts. If you change DJANGO_ADMIN_PASSWORD afterwards, nothing happens; change the password from the Django admin interface instead.