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

Traefik: Proxy an external service? #309

Open
oliverlorenz opened this issue Nov 20, 2024 · 1 comment
Open

Traefik: Proxy an external service? #309

oliverlorenz opened this issue Nov 20, 2024 · 1 comment

Comments

@oliverlorenz
Copy link
Contributor

Hey!

is there any way to configure a simple proxy to an external service? For example provide my.example.com to an IPv6 or something. Background: I have a running service on a Raspberry Pi in my apartment and want to expose them under a domain.

Any ideas? 🙂

@spatterIight
Copy link
Contributor

It is possible to due this with the Traefik role -> https://github.com/mother-of-all-self-hosting/ansible-role-traefik

By using the AUX role you can place a file which will configure the necessary router, service, and etc.

Something like this:

devture_traefik_configuration_extension_yaml: |
  providers:
    file:
      directory: /config/
      watch: true
      filename: ""
  serversTransport:
    insecureSkipVerify: true

aux_file_definitions:
  - dest: "{{ devture_traefik_config_dir_path }}/spatterlight.space.yml"
    content: |
      http:
        routers:
          spatterlight-router:
            rule: Host(`spatterlight.space`)
            service: spatterlight-service
            entryPoints:
              - web-secure
            tls:
              certResolver: default
        services:
          spatterlight-service:
            loadBalancer:
              servers:
                - url: "http://172.24.16.2:2398"
    owner: "traefik"
    group: "traefik"

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

No branches or pull requests

2 participants