Issues getting web app to launch #46

Closed
opened 2025-12-28 23:24:37 +01:00 by adam · 2 comments
Owner

Originally created by @mattague on GitHub (Jul 16, 2025).

I am having trouble getting the service to load.

This is my compose file (completely stock):

services:
  web:
    image: eitchtee/wygiwyh:latest
    container_name: ${SERVER_NAME}
    command: /start-single
    ports:
      - "${OUTBOUND_PORT}:8000"
    env_file:
      - .env
    depends_on:
      - db
    restart: unless-stopped

  db:
    image: postgres:15
    container_name: ${DB_NAME}
    restart: unless-stopped
    volumes:
      - ./postgres_data:/var/lib/postgresql/data/
    environment:
      - POSTGRES_USER=${SQL_USER}
      - POSTGRES_PASSWORD=${SQL_PASSWORD}
      - POSTGRES_DB=${SQL_DATABASE}

This is my .env file:

SERVER_NAME=Budget_easy
DB_NAME=wygiwyh_pg

TZ=UTC# Change to your timezone. This only affects some async tasks.

DEBUG=true
URL = 
HTTPS_ENABLED=false
SECRET_KEY=<My best attempt at a random string>
DJANGO_ALLOWED_HOSTS=http://10.0.0.156
OUTBOUND_PORT=9005

# Uncomment these variables to automatically create an admin account using these credentials on startup.
# After your first successfull login you can remove these variables from your file for safety reasons.
ADMIN_EMAIL=<my super random email that no one could ever guess 69>
ADMIN_PASSWORD=<a random password>

SQL_DATABASE=wygiwyh
SQL_USER=wygiwyh
SQL_PASSWORD=<also a random string of gibberish>
SQL_HOST=${DB_NAME}
SQL_PORT=5432

# Gunicorn
WEB_CONCURRENCY=4

# App Configs
# Enable this if you want to keep deleted transactions in the database
ENABLE_SOFT_DELETE=true
# If ENABLE_SOFT_DELETE is true, transactions deleted for more than KEEP_DELETED_TRANSACTIONS_FOR days will be truly deleted. Set to 0 to keep all.
KEEP_DELETED_TRANSACTIONS_FOR=365

TASK_WORKERS=1 # This only work if you're using the single container option. Increase to have more open queues via procrastinate, you probably don't need to increase this.

# OIDC Configuration. Uncomment the lines below if you want to add OIDC login to your instance
#OIDC_CLIENT_NAME=""
#OIDC_CLIENT_ID=""
#OIDC_CLIENT_SECRET=""
#OIDC_SERVER_URL=""
#OIDC_ALLOW_SIGNUP=true

And the (hopefully) relevant logs:

Budget_easy  | 2025-07-16T02:43:02.807376000Z Procastinate is waiting for web app to start...
Budget_easy  | 2025-07-16T02:43:04.831806000Z Procastinate is waiting for web app to start...
Budget_easy  | 2025-07-16T02:43:06.850150000Z Procastinate is waiting for web app to start...
Budget_easy  | 2025-07-16T02:43:08.870498000Z Procastinate is waiting for web app to start...
Budget_easy  | 2025-07-16T02:43:10.880834000Z Procastinate is waiting for web app to start...
Budget_easy  | 2025-07-16T02:43:11.206738000Z 0 static files copied to '/usr/src/app/static_files', 291 unmodified, 1096 post-processed.
Budget_easy  | 2025-07-16T02:43:12.883204000Z Procastinate is waiting for web app to start...
Budget_easy  | 2025-07-16T02:43:14.886687000Z Procastinate is waiting for web app to start...
Budget_easy  | 2025-07-16T02:43:14.973019000Z SystemCheckError: System check identified some issues:
Budget_easy  | 2025-07-16T02:43:14.973662000Z ERRORS:
Budget_easy  | 2025-07-16T02:43:14.973931000Z ?: (4_0.E001) As of Django 4.0, the values in the CSRF_TRUSTED_ORIGINS setting must start with a scheme (usually http:// or https://) but found . See the release notes for details.
Budget_easy  | 2025-07-16T02:43:15.323998000Z 2025-07-15 22:43:15,323 WARN exited: web (exit status 1; not expected)
Originally created by @mattague on GitHub (Jul 16, 2025). I am having trouble getting the service to load. This is my compose file (completely stock): ``` services: web: image: eitchtee/wygiwyh:latest container_name: ${SERVER_NAME} command: /start-single ports: - "${OUTBOUND_PORT}:8000" env_file: - .env depends_on: - db restart: unless-stopped db: image: postgres:15 container_name: ${DB_NAME} restart: unless-stopped volumes: - ./postgres_data:/var/lib/postgresql/data/ environment: - POSTGRES_USER=${SQL_USER} - POSTGRES_PASSWORD=${SQL_PASSWORD} - POSTGRES_DB=${SQL_DATABASE} ``` This is my .env file: ``` SERVER_NAME=Budget_easy DB_NAME=wygiwyh_pg TZ=UTC# Change to your timezone. This only affects some async tasks. DEBUG=true URL = HTTPS_ENABLED=false SECRET_KEY=<My best attempt at a random string> DJANGO_ALLOWED_HOSTS=http://10.0.0.156 OUTBOUND_PORT=9005 # Uncomment these variables to automatically create an admin account using these credentials on startup. # After your first successfull login you can remove these variables from your file for safety reasons. ADMIN_EMAIL=<my super random email that no one could ever guess 69> ADMIN_PASSWORD=<a random password> SQL_DATABASE=wygiwyh SQL_USER=wygiwyh SQL_PASSWORD=<also a random string of gibberish> SQL_HOST=${DB_NAME} SQL_PORT=5432 # Gunicorn WEB_CONCURRENCY=4 # App Configs # Enable this if you want to keep deleted transactions in the database ENABLE_SOFT_DELETE=true # If ENABLE_SOFT_DELETE is true, transactions deleted for more than KEEP_DELETED_TRANSACTIONS_FOR days will be truly deleted. Set to 0 to keep all. KEEP_DELETED_TRANSACTIONS_FOR=365 TASK_WORKERS=1 # This only work if you're using the single container option. Increase to have more open queues via procrastinate, you probably don't need to increase this. # OIDC Configuration. Uncomment the lines below if you want to add OIDC login to your instance #OIDC_CLIENT_NAME="" #OIDC_CLIENT_ID="" #OIDC_CLIENT_SECRET="" #OIDC_SERVER_URL="" #OIDC_ALLOW_SIGNUP=true ``` And the (hopefully) relevant logs: ``` Budget_easy | 2025-07-16T02:43:02.807376000Z Procastinate is waiting for web app to start... Budget_easy | 2025-07-16T02:43:04.831806000Z Procastinate is waiting for web app to start... Budget_easy | 2025-07-16T02:43:06.850150000Z Procastinate is waiting for web app to start... Budget_easy | 2025-07-16T02:43:08.870498000Z Procastinate is waiting for web app to start... Budget_easy | 2025-07-16T02:43:10.880834000Z Procastinate is waiting for web app to start... Budget_easy | 2025-07-16T02:43:11.206738000Z 0 static files copied to '/usr/src/app/static_files', 291 unmodified, 1096 post-processed. Budget_easy | 2025-07-16T02:43:12.883204000Z Procastinate is waiting for web app to start... Budget_easy | 2025-07-16T02:43:14.886687000Z Procastinate is waiting for web app to start... Budget_easy | 2025-07-16T02:43:14.973019000Z SystemCheckError: System check identified some issues: Budget_easy | 2025-07-16T02:43:14.973662000Z ERRORS: Budget_easy | 2025-07-16T02:43:14.973931000Z ?: (4_0.E001) As of Django 4.0, the values in the CSRF_TRUSTED_ORIGINS setting must start with a scheme (usually http:// or https://) but found . See the release notes for details. Budget_easy | 2025-07-16T02:43:15.323998000Z 2025-07-15 22:43:15,323 WARN exited: web (exit status 1; not expected) ```
adam closed this issue 2025-12-28 23:24:38 +01:00
Author
Owner

@eitchtee commented on GitHub (Jul 16, 2025):

Howdy, let's get this fixed, shall we?

The error you're seeing on the logs is due to the URL variable being empty instead of omitted.

Taking a look at your configurations, you seem to be running WYGIWYH locally (behind your local ip), so you probably want to make the following modifications:

  • Comment or remove URL from your env file instead of leaving it empty;
  • Set DJANGO_ALLOWED_HOSTS to localhost 127.0.0.1 [::1] 10.0.0.156, notice the 10.0.0.156, this should be the IP you're going to access WYGIWYH at IF you're not planning on using localhost or 127.0.0.1, this could also be a Tailscale IP (or similar services), you can even add multiple IPs separated by space
  • You probably enabled it to get better logs, but I strongly recommend setting debug to False oce your instance is working

This should get you going. If everything works, it'll be available on localhost:9005, 127:0.0.1:9005 and 10.0.0.156:9005

Let me know how it goes. Hope you like WYGIWYH.

@eitchtee commented on GitHub (Jul 16, 2025): Howdy, let's get this fixed, shall we? The error you're seeing on the logs is due to the URL variable being empty instead of omitted. Taking a look at your configurations, you seem to be running WYGIWYH locally (behind your local ip), so you probably want to make the following modifications: - Comment or remove `URL` from your env file instead of leaving it empty; - Set `DJANGO_ALLOWED_HOSTS` to `localhost 127.0.0.1 [::1] 10.0.0.156`, notice the 10.0.0.156, this should be the IP you're going to access WYGIWYH at IF you're not planning on using localhost or 127.0.0.1, this could also be a Tailscale IP (or similar services), you can even add multiple IPs separated by space - You probably enabled it to get better logs, but I strongly recommend setting debug to False oce your instance is working This should get you going. If everything works, it'll be available on localhost:9005, 127:0.0.1:9005 and 10.0.0.156:9005 Let me know how it goes. Hope you like WYGIWYH.
Author
Owner

@mattague commented on GitHub (Jul 16, 2025):

I totally misunderstood the documentation on that part, not sure how it didn't occur to me that leaving a blank variable would cause an issue haha. Thank you for such a quick response.

@mattague commented on GitHub (Jul 16, 2025): I totally misunderstood the documentation on that part, not sure how it didn't occur to me that leaving a blank variable would cause an issue haha. Thank you for such a quick response.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WYGIWYH#46