Skip to content

Instantly share code, notes, and snippets.

@ezy
Last active January 4, 2021 23:58
Show Gist options
  • Save ezy/0419732afb5d4e5cee625b530c3deeb8 to your computer and use it in GitHub Desktop.
Save ezy/0419732afb5d4e5cee625b530c3deeb8 to your computer and use it in GitHub Desktop.
Docker compose for home server
version: "2"
services:
jellyfin:
image: linuxserver/jellyfin
container_name: jellyfin
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
volumes:
- /srv/appdata/jellyfin/config:/config
- /media/wdusb/tv:/data/tvshows
- /media/wdusb/movies:/data/movies
- /media/wdusb/recording:/data/recording
- /srv/appdata/jellyfin/transcode:/transcode
ports:
- 8096:8096
restart: unless-stopped
qbittorrent:
image: linuxserver/qbittorrent
container_name: qbittorrent
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
- UMASK_SET=022
- WEBUI_PORT=8080
volumes:
- /srv/appdata/qbittorrent:/config
- /media/wdusb/downloads:/downloads
ports:
- 6881:6881
- 6881:6881/udp
- 8080:8080
restart: unless-stopped
sonarr:
image: linuxserver/sonarr
container_name: sonarr
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
volumes:
- /srv/appdata/sonarr:/config
- /media/wdusb/tv:/tv
- /media/wdusb/anime:/anime
- /media/wdusb/downloads:/downloads
ports:
- 8989:8989
restart: unless-stopped
radarr:
image: linuxserver/radarr
container_name: radarr
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
volumes:
- /srv/appdata/radarr:/config
- /media/wdusb/movies:/movies
- /media/wdusb/downloads:/downloads
ports:
- 7878:7878
restart: unless-stopped
jackett:
image: linuxserver/jackett
container_name: jackett
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
volumes:
- /srv/appdata/jackett:/config
ports:
- 9117:9117
restart: unless-stopped
nextcloud:
image: nextcloud:latest
container_name: nextcloud-app
networks:
- nextcloud_network
depends_on:
- letsencrypt
- proxy
- postgres
volumes:
- nextcloud:/var/www/html
- /srv/appdata/nextcloud/config:/var/www/html/config
- /srv/appdata/nextcloud/custom_apps:/var/www/html/custom_apps
- /srv/appdata/nextcloud/data:/var/www/html/data
- /srv/appdata/nextcloud/themes:/var/www/html/themes
- /etc/localtime:/etc/localtime:ro
environment:
- VIRTUAL_HOST=next.url.nz
- LETSENCRYPT_HOST=next.url.nz
- [email protected]
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
restart: unless-stopped
proxy:
image: jwilder/nginx-proxy:alpine
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"
container_name: nextcloud-proxy
networks:
- nextcloud_network
ports:
- 80:80
- 443:443
volumes:
- /srv/appdata/proxy/conf.d:/etc/nginx/conf.d:rw
- /srv/appdata/proxy/vhost.d:/etc/nginx/vhost.d:rw
- /srv/appdata/proxy/html:/usr/share/nginx/html:rw
- /srv/appdata/proxy/certs:/etc/nginx/certs:ro
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
restart: unless-stopped
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: nextcloud-letsencrypt
depends_on:
- proxy
networks:
- nextcloud_network
volumes:
- /srv/appdata/proxy/certs:/etc/nginx/certs:rw
- /srv/appdata/proxy/vhost.d:/etc/nginx/vhost.d:rw
- /srv/appdata/proxy/html:/usr/share/nginx/html:rw
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
postgres:
image: postgres:10
container_name: nextcloud-postgres
ports:
- 5432:5432
networks:
- nextcloud_network
volumes:
- /srv/appdata/postgres/db:/var/lib/postgresql
- /srv/appdata/postgres/db/init:/docker-entrypoint-initdb.d
environment:
POSTGRES_USER: nextcloud
POSTGRES_PASSWORD: ${MYSQL_PASSWORD}
POSTGRES_DB: nextcloud
restart: unless-stopped
plex:
image: plexinc/pms-docker
container_name: plex
volumes:
- /srv/appdata/plex/config:/config
- /srv/appdata/plex/transcode:/transcode
- /media/wdusb/movies:/movies
- /media/wdusb/tv:/tv
network_mode: host
restart: unless-stopped
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
minecraft:
image: itzg/minecraft-bedrock-server
ports:
- 19132:19132
environment:
EULA: 'TRUE'
GAMEMODE: survival
DIFFICULTY: normal
volumes:
- minecraft:/srv/appdata/minecraft
volumes:
nextcloud:
networks:
nextcloud_network:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment