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

fix missing basePath #3620

Merged
merged 1 commit into from
Nov 2, 2024
Merged

fix missing basePath #3620

merged 1 commit into from
Nov 2, 2024

Conversation

khassel
Copy link
Collaborator

@khassel khassel commented Nov 1, 2024

fixes #3613

wanted to write a test for basePath but have no idea at the moment to simulate this without a reverse proxy.

Here my test setup for documentation:

networks:
  proxy:
    driver: bridge

services:
  socket-proxy:
    privileged: true
    image: tecnativa/docker-socket-proxy:edge
    container_name: socket-proxy
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      CONTAINERS: 1
    ports:
      - "127.0.0.1:2375:2375"
    networks:
      - proxy

  traefik:
    image: traefik:latest
    container_name: traefik
    restart: unless-stopped
    user: 1000:1000
    command:
      - "--providers.docker=true"
      - "--providers.docker.network=traefik_proxy"
      - "--providers.docker.endpoint=tcp://socket-proxy:2375"
      - "--entryPoints.http.address=:80"
      - "--global.sendAnonymousUsage=false"
      - "--log.level=INFO"
      - "--api=true"
      - "--api.dashboard=true"
#      - "--accessLog=true"
#      - "--accesslog.fields.defaultmode=keep"
#      - "--accesslog.fields.headers.defaultmode=keep"
    networks:
      - proxy
    ports:
      - "80:80"

  magicmirror:
    image: karsten13/magicmirror:develop
    container_name: mm
    restart: unless-stopped
    entrypoint:
      - sleep
      - infinity
    networks:
      - proxy
    labels:
      - "traefik.http.services.karsten13.loadbalancer.server.port=8080"
      - "traefik.http.routers.k13-http.service=karsten13"
      - "traefik.http.routers.k13-http.entrypoints=http"
      - "traefik.http.routers.k13-http.rule=Host(`localhost`) && PathPrefix(`/testbasepath`)"
      - "traefik.http.middlewares.k13-stripprefix.stripprefix.prefixes=/testbasepath"
      - "traefik.http.routers.k13-http.middlewares=k13-stripprefix"

@khassel khassel requested a review from rejas November 1, 2024 21:03
@sdetweil
Copy link
Collaborator

sdetweil commented Nov 1, 2024

can we become a reverse proxy in test mode? some extra code?

@sdetweil
Copy link
Collaborator

sdetweil commented Nov 1, 2024

IMG_0427

@khassel
Copy link
Collaborator Author

khassel commented Nov 1, 2024

sounds like the next new project, can put it at the end of the long list ...

@sdetweil
Copy link
Collaborator

sdetweil commented Nov 1, 2024

lol!

@rejas rejas merged commit 9114aef into MagicMirrorOrg:develop Nov 2, 2024
10 checks passed
@khassel khassel deleted the basepath branch November 4, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants