Skip to content

Assets load from IP instead of ASSET_URL (reverse proxy using traefik) #2026

@stephanrenggli

Description

@stephanrenggli

Current Behavior

I am currently running panel:v1.0.0-beta29 using docker and traefik as reverse proxy.

services:
  pelican:
    container_name: pelican
    image: ghcr.io/pelican-dev/panel:v1.0.0-beta29
    restart: always
    # ports:
    #   - "8888:80"
    #   - "8843:443"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    volumes:
      - pelican-data:/pelican-data
      - pelican-logs:/var/www/html/storage/logs
    environment:
      XDG_DATA_HOME: /pelican-data
      APP_URL: "https://panel.example.com"
      APP_DEBUG: "false"
      APP_ENV: "production"
      ADMIN_EMAIL: "me@example.com"
      MAIL_DRIVER: "log"
      BEHIND_PROXY: "true"
      TRUSTED_PROXIES: "172.16.0.0/12"
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=proxy"
      - "traefik.http.services.pelican.loadbalancer.server.port=80"
      # http
      - "traefik.http.routers.pelican.entrypoints=http"
      - "traefik.http.routers.pelican.rule=Host(`panel.example.com`)"
      - "traefik.http.routers.pelican.middlewares=https-redirect@file"
      # https
      - "traefik.http.routers.pelican-secure.entrypoints=https"
      - "traefik.http.routers.pelican-secure.rule=Host(`panel.example.com`)"
      - "traefik.http.routers.pelican-secure.middlewares=secured@file"
      - "traefik.http.routers.pelican-secure.tls=true"
      - "traefik.http.routers.pelican-secure.service=pelican"
    networks:
      - proxy

volumes:
  pelican-data:
  pelican-logs:

networks:
  proxy:
    external: true

This works as intended. However when switching to panel:v1.0.0-beta30 the reverse proxy setup seems to break, as assets are requested from an IP instead of the APP_URL.

I then found this post on Discord and also set ASSET_URL to the same url as APP_URL in my docker-compose.yaml, but that did not help.

I saw there were some changes to the Dockerfile in beta30 #1999, and ASSET_URL should be automatically set to APP_URL anyway.

So currently not sure where the issue could be, as the setup works perfectly fine with beta29.

Expected Behavior

Assets should be served from the APP_URL instead of from the Docker Host IP.

Steps to Reproduce

  1. Run pelican with the docker-compose described above.
  2. Load website (should work)
  3. Update version to beta30
  4. Restart container with new version
  5. Load website (assets are not being loaded from the correct url)

Panel Version

beta29

Wings Version

beta21

Games and/or Eggs Affected

No response

Docker Image

No response

Error Logs

Is there an existing issue for this?

  • I have searched the existing issues before opening this issue.
  • I have provided all relevant details, including the specific game and Docker images I am using if this issue is related to running a server.
  • I have checked in the Discord server and believe this is a bug with the software, and not a configuration issue with my specific system.

Metadata

Metadata

Assignees

Labels

not confirmedNot yet verified or reproduced by maintainers

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions