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

"Instructions" not showing when using reverse proxy #3446

Open
Engr-AllanG opened this issue Dec 23, 2024 · 0 comments
Open

"Instructions" not showing when using reverse proxy #3446

Engr-AllanG opened this issue Dec 23, 2024 · 0 comments
Labels
setup issue possibly or definitely an issue with the user setup

Comments

@Engr-AllanG
Copy link

Issue

Hello,
I Cannot get the "instruction" section to show when using a reverse proxy. When accessing the application using the local IP address, it works fine.

The untare android app, which is using my public domain name and therefore is going through my reverse proxy, seems to find the directions block.

I am using the supplied docker setup with the dedicated nginx container. I have a separate reverse proxy in a separate proxmox container. Images in tandoor are loading fine.

Any help would be appreciated, thank you

image
image

Tandoor Version

1.5.24

OS Version

Ubuntu 22.04

Setup

Docker / Docker-Compose

Reverse Proxy

Others (please state below)

Other

nginx, seperate proxmox container

Environment file

# ---------------------------------------------------------------------------
# This template contains only required options.
# Visit the docs to find more https://docs.tandoor.dev/system/configuration/
# ---------------------------------------------------------------------------

# random secret key, use for example `base64 /dev/urandom | head -c50` to generate one
SECRET_KEY=blah

# allowed hosts (see documentation), should be set to your hostname(s) but might be * (default) for some proxies/providers
 ALLOWED_HOSTS=*

# add only a database password if you want to run with the default postgres, otherwise change settings accordingly
DB_ENGINE=django.db.backends.postgresql
POSTGRES_HOST=db_recipes
POSTGRES_DB=djangodb
POSTGRES_PORT=5432
POSTGRES_USER=djangouser
POSTGRES_PASSWORD=blah

#shouldn't be needed aymore, my issue was my host reverse proxy not needing the /media location
#GUNICORN_MEDIA=0

Docker-Compose file

services:
  db_recipes:
    restart: always
    image: postgres:16-alpine
    volumes:
      - ./postgresql:/var/lib/postgresql/data
    env_file:
      - ./.env

  web_recipes:
    restart: always
    image: vabene1111/recipes
    env_file:
      - ./.env
    volumes:
      - staticfiles:/opt/recipes/staticfiles
      # Do not make this a bind mount, see https://docs.tandoor.dev/install/docker/#volumes-vs-bind-mounts
      - nginx_config:/opt/recipes/nginx/conf.d
      - ./mediafiles:/opt/recipes/mediafiles
    depends_on:
      - db_recipes

  nginx_recipes:
    image: nginx:mainline-alpine
    restart: always
    ports:
      - 8080:80
    env_file:
      - ./.env
    depends_on:
      - web_recipes
    volumes:
      # Do not make this a bind mount, see https://docs.tandoor.dev/install/docker/#volumes-vs-bind-mounts
      - nginx_config:/etc/nginx/conf.d:ro
      - staticfiles:/static:ro
      - ./mediafiles:/media:ro

volumes:
  nginx_config:
  staticfiles:

Relevant logs

reverse proxy configuration:

server {
	listen 443 ssl;
	server_name ----.net;
	include /etc/nginx/includes/ssl.conf;
	include /etc/nginx/includes/securityheaders.conf;
	
	ssl on;
	server_tokens off;

	access_log /var/log/nginx/tandoor-access.log;
	error_log  /var/log/nginx/tandoor-error.log error;

	client_max_body_size 128M;

	add_header Content-Security-Policy "script-src 'self' 'unsafe-inline'; default-src 'self' 'unsafe-inline' data: blob: http: https:; object-src 'none'; base-uri 'none'; frame-ancestors 'self';" always;

	add_header "Access-Control-Allow-Origin" "$http_origin";

	location / {
		proxy_set_header Host $http_host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto $scheme;
		proxy_set_header X-Frame-Options SAMEORIGIN;
		
		#include proxy_params;
		proxy_pass http://192.168.1.232:8080;
@Engr-AllanG Engr-AllanG added the setup issue possibly or definitely an issue with the user setup label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
setup issue possibly or definitely an issue with the user setup
Projects
None yet
Development

No branches or pull requests

1 participant