jackyzy823 / fxa-selfhosting

Selfhosting your own Firefox Accounts (FxA)!
Mozilla Public License 2.0
99 stars 13 forks source link

Asking for guidance- Traefik Reverse Proxy. #28

Closed Handrail9 closed 3 months ago

Handrail9 commented 3 months ago

Hello, I am here to ask if I would be able to be helped getting this up and running in my workspace. Basically, I want to know what would be the proper way to integrate fxa with traefik if anyone here smarter than me knows. I normally use docker labels to define services, but I also have a dynamic configuration file for services that aren't compatible with docker labels. If I can provide any more information at all that would help get me to where I need to be that is no problem. I really just want to self host FF Sync with my own accounts so myself and my friends are not relying on Mozilla. Thank you so much in advance for your time. I've attached my config file here: config.yml.txt

Handrail9 commented 3 months ago

I believe I've figured it out. Pasting my configuration below. Adding these labels to nginx should work. Obviously replace the domains with what you set up in your config.

    labels:
    - traefik.enable=true
    - traefik.http.routers.fxa.entrypoints=YOUR_ENTRYPOINTS
    - traefik.http.routers.fxa.rule=Host(`fxaapi.yourdomain.tld`) || Host(`fxa.yourdomain.tld`) || Host(`fxaoauth.yourdomain.tld`) || Host(`fxaprofile.yourdomain.tld`) || Host(`fxatoken.yourdomain.tld`) || Host(`fxachannelserver.yourdomain.tld`) || Host(`fxagraphql.youtdomain.tld`)
    - traefik.http.routers.fxa.tls=true
    - traefik.http.routers.fxa.tls.certresolver=YOUR_CERT_RESOLVER
    - traefik.http.routers.fxa.tls.domains[0].sans=fxaapi.yourdomain.tld,fxaoauth.yourdomain.tld,fxaprofile.yourdomain.tld,fxatoken.yourdomain.tld,fxachannelserver.yourdomain.tld,fxa.yourdomain.tld,fxagraphql.youtdomain.tld
    - traefik.docker.network=YOUR_NETWORK
    - traefik.http.services.fxa.loadbalancer.server.port=80