Last active
June 3, 2020 20:10
-
-
Save schliflo/9a0b566e139da42e91400f016b2cdcd9 to your computer and use it in GitHub Desktop.
Docker compose plex letsencrypt proxy setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /opt/docker-compose.yml | |
--- | |
version: '2' | |
services: | |
proxy: | |
image: jwilder/nginx-proxy | |
container_name: proxy | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- ./proxy/conf.d:/etc/nginx/conf.d | |
- ./proxy/vhost.d:/etc/nginx/vhost.d | |
- ./proxy/html:/usr/share/nginx/html | |
- ./proxy/certs:/etc/nginx/certs:ro | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
networks: | |
- proxy-tier | |
restart: always | |
letsencrypt: | |
image: jrcs/letsencrypt-nginx-proxy-companion | |
container_name: letsencrypt | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
- ./proxy/certs:/etc/nginx/certs | |
volumes_from: | |
- proxy | |
networks: | |
- proxy-tier | |
restart: always | |
plex: | |
image: plexinc/pms-docker | |
container_name: plex | |
ports: | |
- "32400:32400/tcp" | |
- "1900:1900/udp" | |
- "3005:3005/tcp" | |
- "5353:5353/udp" | |
- "8324:8324/tcp" | |
- "32410:32410/udp" | |
- "32412-32414:32412-32414/udp" | |
- "32469:32469/tcp" | |
volumes: | |
- /opt/appdata/plex:/config | |
- /mnt/storage/shares:/data #TODO: adapt this to your media files location | |
networks: | |
- proxy-tier | |
restart: always | |
environment: | |
- PUID=${PUID} | |
- PGID=${PGID} | |
- VIRTUAL_HOST=plex.example.com #TODO: adapt this to your domain | |
- VIRTUAL_PORT=32400 | |
- LETSENCRYPT_HOST=plex.example.com #TODO: adapt this to your domain | |
- [email protected] #TODO: adapt this to your email | |
networks: | |
proxy-tier: | |
external: | |
name: nginx-proxy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment