Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #269 from jellyfin/Artiume-ducks-everywhere
Browse files Browse the repository at this point in the history
add basic auth to traefik
  • Loading branch information
dkanada authored Apr 10, 2020
2 parents 248ba95 + 4111e5f commit c0dd074
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions general/networking/traefik.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,19 @@ echo $(htpasswd -nb username mystrongpassword) | sed -e s/\\$/\\$\\$/g

This command automatically escapes all $ inside the password for the YML file. If using an environment file, it does not need the $ escaped since it will not be interpreted by the shell.

Create the docker network for traefik.

```bash
sudo docker network create traefik
```

### docker-compose.yml

```yml
version: '3.5'

networks:
traefik:
name: traefik
services:
traefik:
container_name: traefik
Expand Down Expand Up @@ -57,6 +65,7 @@ services:
traefik.frontend.headers.customResponseHeaders: X-Robots-Tag:noindex,nofollow,nosnippet,noarchive,notranslate,noimageindex
traefik.frontend.headers.frameDeny: "true"
traefik.frontend.headers.customFrameOptionsValue: 'allow-from https://example.com'
# traefik.frontend.auth.basic.users: xxx:xxx
restart: unless-stopped

jellyfin:
Expand All @@ -68,10 +77,6 @@ services:
- /path/to/cache:/cache
- /path/to/media:/media
restart: unless-stopped

networks:
traefik:
name: traefik
```
This TOML file can't support environment variables, so don't attempt to use variables.
Expand Down

0 comments on commit c0dd074

Please sign in to comment.