├── Chatpad └── docker-compose.yml ├── Dozle └── docker-compose.yml ├── Flame Dashboard └── docker-compose.yml ├── Trilium Notes └── docker-compose.yml ├── Home Assistent └── docker-compose.yml ├── Linkding ├── docker-compose.yml └── .env ├── Kanboard └── docker-compose.yml ├── Dokuwiki └── docker-compose.yml ├── Nextcloud └── docker-compose.yml ├── Portainer └── docker-compose.yml ├── Bitwarden └── docker-compose.yml ├── VsCode └── docker-compose.yml ├── PiAlert └── docker-compose.yml ├── DockCheck └── docker-compose.yml ├── Kavita └── docker-compose.yml ├── Nginx Reverse Proxy Manager └── docker-compose.yml ├── Unifi Controller └── docker-compose.yml ├── PiHole └── docker-compose.yml ├── Wireguard Easy VPN └── docker-compose.yml ├── Invidious └── docker-compose.yml ├── update_containers.sh └── README.md /Chatpad/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Based on ChatGTP; you need an API key for this to work 2 | version: "3" 3 | services: 4 | web: 5 | image: itsnoted/chatpad:latest 6 | container_name: chatpad 7 | ports: 8 | - "8200:80" 9 | -------------------------------------------------------------------------------- /Dozle/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | dozzle: 4 | container_name: dozzle 5 | image: amir20/dozzle:latest 6 | volumes: 7 | - /var/run/docker.sock:/var/run/docker.sock 8 | ports: 9 | - 9999:8080 10 | 11 | -------------------------------------------------------------------------------- /Flame Dashboard/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2.1' 2 | services: 3 | flame: 4 | image: pawelmalak/flame:latest 5 | container_name: flame 6 | volumes: 7 | - /srv/config/flame:/app/data 8 | ports: 9 | - 5005:5005 10 | environment: 11 | - PASSWORD=SecretPassword123 12 | restart: unless-stopped 13 | -------------------------------------------------------------------------------- /Trilium Notes/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2.1' 2 | services: 3 | trilium: 4 | image: zadam/trilium 5 | restart: unless-stopped 6 | environment: 7 | - TRILIUM_DATA_DIR=/home/node/trilium-data 8 | ports: 9 | - "8081:8080" 10 | volumes: 11 | - ./trilium:/home/node/trilium-data 12 | 13 | volumes: 14 | trilium: 15 | -------------------------------------------------------------------------------- /Home Assistent/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | homeassistant: 4 | container_name: homeassistant 5 | image: "ghcr.io/home-assistant/home-assistant:stable" 6 | volumes: 7 | - ./config:/config 8 | - /etc/localtime:/etc/localtime:ro 9 | restart: unless-stopped 10 | privileged: true 11 | network_mode: host 12 | -------------------------------------------------------------------------------- /Linkding/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | linkding: 5 | container_name: "${LD_CONTAINER_NAME:-linkding}" 6 | image: sissbruecker/linkding:latest 7 | ports: 8 | - "${LD_HOST_PORT:-9090}:9090" 9 | volumes: 10 | - "${LD_HOST_DATA_DIR:-./data}:/etc/linkding/data" 11 | env_file: 12 | - .env 13 | restart: unless-stopped 14 | -------------------------------------------------------------------------------- /Kanboard/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | kanboard: 4 | image: kanboard/kanboard:latest 5 | ports: 6 | - "8122:80" 7 | #- "443:443" 8 | volumes: 9 | - ./kanboard_data:/var/www/app/data 10 | - ./kanboard_plugins:/var/www/app/plugins 11 | - ./kanboard_ssl:/etc/nginx/ssl 12 | volumes: 13 | kanboard_data: 14 | kanboard_plugins: 15 | kanboard_ssl: 16 | -------------------------------------------------------------------------------- /Dokuwiki/docker-compose.yml: -------------------------------------------------------------------------------- 1 | --- 2 | version: "2.1" 3 | services: 4 | dokuwiki: 5 | image: lscr.io/linuxserver/dokuwiki:latest 6 | container_name: dokuwiki 7 | environment: 8 | - PUID=1000 9 | - PGID=1000 10 | - TZ=Europe/Amsterdam 11 | volumes: 12 | - ./config:/config 13 | ports: 14 | - 86:80 15 | #- 443:443 #optional 16 | restart: unless-stopped 17 | -------------------------------------------------------------------------------- /Nextcloud/docker-compose.yml: -------------------------------------------------------------------------------- 1 | --- 2 | version: "2.1" 3 | services: 4 | nextcloud: 5 | image: lscr.io/linuxserver/nextcloud:latest 6 | container_name: nextcloud 7 | environment: 8 | - PUID=1000 9 | - PGID=1000 10 | - TZ=Europe/Amsterdam 11 | volumes: 12 | - ./appdata:/config 13 | - ./data:/data 14 | ports: 15 | - 444:443 16 | restart: unless-stopped 17 | -------------------------------------------------------------------------------- /Portainer/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | portainer: 5 | image: portainer/portainer-ce:latest 6 | container_name: portainer 7 | restart: unless-stopped 8 | security_opt: 9 | - no-new-privileges:true 10 | volumes: 11 | - /etc/localtime:/etc/localtime:ro 12 | - /var/run/docker.sock:/var/run/docker.sock:ro 13 | - ./portainer-data:/data 14 | ports: 15 | - 9000:9000 16 | -------------------------------------------------------------------------------- /Bitwarden/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # docker-compose.yml 2 | version: '3' 3 | 4 | services: 5 | bitwarden: 6 | image: bitwardenrs/server 7 | restart: unless-stopped 8 | ports: 9 | - 8000:80 10 | volumes: 11 | - ./bw-data:/data 12 | environment: 13 | WEBSOCKET_ENABLED: 'true' # Required to use websockets 14 | #SIGNUPS_ALLOWED: 'true' # set to false to disable signups 15 | SIGNUPS_ALLOWED: 'false' # set to true to enable signups 16 | -------------------------------------------------------------------------------- /VsCode/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2.1" 2 | services: 3 | code-server: 4 | image: lscr.io/linuxserver/code-server:latest 5 | container_name: code-server 6 | environment: 7 | - PUID=1001 8 | - PGID=1001 9 | - TZ=Africa/Nairobi 10 | - PASSWORD=Password01 11 | - SUDO_PASSWORD=SudoPassword 12 | volumes: 13 | - /opt/codeserver/config:/config 14 | ports: 15 | - 8443:8443 16 | restart: unless-stopped 17 | -------------------------------------------------------------------------------- /PiAlert/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | pi.alert: 4 | container_name: Pi.Alert 5 | healthcheck: 6 | test: curl -f http://localhost:17811/ || exit 1 7 | security_opt: 8 | - no-new-privileges:true 9 | environment: 10 | - TZ=Europe/Amsterdam 11 | - PORT=17811 12 | network_mode: "host" 13 | restart: unless-stopped 14 | image: jokobsk/pi.alert:latest 15 | networks: 16 | host: 17 | external: true 18 | -------------------------------------------------------------------------------- /DockCheck/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.2' 2 | services: 3 | dockcheck-web: 4 | container_name: dockcheck-web 5 | image: 'palleri/dockcheck-web:latest' 6 | restart: unless-stopped 7 | ports: 8 | - '85:80' 9 | volumes: 10 | - ./data:/var/www/html 11 | - /var/run/docker.sock:/var/run/docker.sock:ro 12 | - /etc/localtime:/etc/localtime:ro 13 | environment: 14 | NOTIFY: "false" 15 | #NOTIFY_URLS: "discord://Dockcheck-web@xxxxx/xxxxxx" 16 | -------------------------------------------------------------------------------- /Kavita/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | kavita: 4 | image: kizaing/kavita:latest 5 | container_name: kavita 6 | volumes: 7 | - ./strip:/strip 8 | - ./fictie:/fictie 9 | - ./studie:/studie 10 | # - ./add_your_own_directories:/some_directory 11 | - ./config:/kavita/config 12 | ports: 13 | - "5000:5000" 14 | restart: unless-stopped 15 | environment: 16 | - TZ=Europe/Amsterdam 17 | -------------------------------------------------------------------------------- /Nginx Reverse Proxy Manager/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | nginx: 5 | image: 'jc21/nginx-proxy-manager:2.9.22' # At this moment I'm using the 2.9.22 image because the latest did not work. 6 | container_name: nginx_proxy_manager 7 | restart: unless-stopped 8 | security_opt: 9 | - no-new-privileges:true 10 | volumes: 11 | - /etc/localtime:/etc/localtime:ro 12 | - /var/run/docker.sock:/var/run/docker.sock:ro 13 | - ./portainer-data:/data 14 | ports: 15 | - 9000:9000 16 | -------------------------------------------------------------------------------- /Unifi Controller/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | unifi-controller: 4 | container_name: unifi.controller 5 | image: jacobalberty/unifi 6 | restart: no 7 | volumes: 8 | - './data/lib:/var/lib/unifi' 9 | - './data/log:/var/log/unifi' 10 | - './data/run:/var/run/unifi' 11 | ports: 12 | - '3478:3478/udp' 13 | - '10001:10001/udp' 14 | - '6789:6789/tcp' 15 | - '8080:8080/tcp' 16 | - '8880:8880/tcp' 17 | - '8443:8443/tcp' 18 | - '8843:8843/tcp' 19 | environment: 20 | - TZ=Europe/Amsterdam 21 | labels: 22 | - 'unifi-controller' 23 | -------------------------------------------------------------------------------- /PiHole/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | # More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/ 4 | services: 5 | pihole: 6 | container_name: pihole 7 | image: pihole/pihole:latest 8 | # For DHCP it is recommended to remove these ports and instead add: network_mode: "host" 9 | ports: 10 | - "54:53/tcp" 11 | - "54:53/udp" 12 | - "67:67/udp" # Only required if you are using Pi-hole as your DHCP server 13 | - "82:80/tcp" 14 | environment: 15 | TZ: 'Europe/Amsterdam' 16 | # WEBPASSWORD: 'set a secure password here or it will be random' 17 | # Volumes store your data between container upgrades 18 | volumes: 19 | - './etc-pihole:/etc/pihole' 20 | - './etc-dnsmasq.d:/etc/dnsmasq.d' 21 | # https://github.com/pi-hole/docker-pi-hole#note-on-capabilities 22 | #cap_add: 23 | #- NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed 24 | restart: unless-stopped 25 | -------------------------------------------------------------------------------- /Wireguard Easy VPN/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | wg-easy: 4 | environment: 5 | # ⚠️ Required: 6 | # Change this to your host's public address 7 | - WG_HOST=example.com 8 | 9 | # Optional: 10 | - PASSWORD=supersecretpassword 11 | # - WG_PORT=51820 12 | # - WG_DEFAULT_ADDRESS=10.8.0.x 13 | # - WG_DEFAULT_DNS=1.1.1.1 14 | # - WG_MTU=1420 15 | # - WG_ALLOWED_IPS=192.168.15.0/24, 10.0.1.0/24 16 | # - WG_PRE_UP=echo "Pre Up" > /etc/wireguard/pre-up.txt 17 | # - WG_POST_UP=echo "Post Up" > /etc/wireguard/post-up.txt 18 | # - WG_PRE_DOWN=echo "Pre Down" > /etc/wireguard/pre-down.txt 19 | # - WG_POST_DOWN=echo "Post Down" > /etc/wireguard/post-down.txt 20 | 21 | image: weejewel/wg-easy 22 | container_name: wg-easy 23 | volumes: 24 | - ./wireguard:/etc/wireguard 25 | ports: 26 | - "51820:51820/udp" 27 | - "51821:51821/tcp" 28 | restart: unless-stopped 29 | cap_add: 30 | - NET_ADMIN 31 | - SYS_MODULE 32 | sysctls: 33 | - net.ipv4.ip_forward=1 34 | - net.ipv4.conf.all.src_valid_mark=1 35 | -------------------------------------------------------------------------------- /Invidious/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | 4 | invidious: 5 | image: quay.io/invidious/invidious:latest 6 | # image: quay.io/invidious/invidious:latest-arm64 # ARM64/AArch64 devices 7 | restart: unless-stopped 8 | ports: 9 | #- "127.0.0.1:3000:3000" 10 | - "3000:3000" 11 | environment: 12 | # Please read the following file for a comprehensive list of all available 13 | # configuration options and their associated syntax: 14 | # https://github.com/iv-org/invidious/blob/master/config/config.example.yml 15 | INVIDIOUS_CONFIG: | 16 | db: 17 | dbname: invidious 18 | user: someusername 19 | password: somestrongpassword 20 | host: invidious-db 21 | port: 5432 22 | check_tables: true 23 | # external_port: 24 | # domain: 25 | # https_only: false 26 | # statistics_enabled: false 27 | healthcheck: 28 | test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/comments/jNQXAC9IVRw || exit 1 29 | interval: 30s 30 | timeout: 5s 31 | retries: 2 32 | depends_on: 33 | - invidious-db 34 | 35 | invidious-db: 36 | image: docker.io/library/postgres:14 37 | restart: unless-stopped 38 | volumes: 39 | - postgresdata:/var/lib/postgresql/data 40 | - ./config/sql:/config/sql 41 | - ./docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh 42 | environment: 43 | POSTGRES_DB: invidious 44 | POSTGRES_USER: someusername 45 | POSTGRES_PASSWORD: somestrongpassword 46 | healthcheck: 47 | test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"] 48 | 49 | volumes: 50 | -------------------------------------------------------------------------------- /Linkding/.env: -------------------------------------------------------------------------------- 1 | # Docker container name 2 | LD_CONTAINER_NAME=linkding 3 | # Port on the host system that the application should be published on 4 | LD_HOST_PORT=9090 5 | # Directory on the host system that should be mounted as data dir into the Docker container 6 | LD_HOST_DATA_DIR=./data 7 | 8 | # Can be used to run linkding under a context path, for example: linkding/ 9 | # Must end with a slash `/` 10 | LD_CONTEXT_PATH= 11 | # Username of the initial superuser to create, leave empty to not create one 12 | LD_SUPERUSER_NAME=john_doe 13 | # Password for the initial superuser, leave empty to disable credentials authentication and rely on proxy authentication instead 14 | LD_SUPERUSER_PASSWORD=PasswordForJohnDoe 15 | # Option to disable background tasks 16 | LD_DISABLE_BACKGROUND_TASKS=False 17 | # Option to disable URL validation for bookmarks completely 18 | LD_DISABLE_URL_VALIDATION=False 19 | # Enables support for authentication proxies such as Authelia 20 | LD_ENABLE_AUTH_PROXY=False 21 | # Name of the request header that the auth proxy passes to the application to identify the user 22 | # See docs/Options.md for more details 23 | LD_AUTH_PROXY_USERNAME_HEADER= 24 | # The URL that linkding should redirect to after a logout, when using an auth proxy 25 | # See docs/Options.md for more details 26 | LD_AUTH_PROXY_LOGOUT_URL= 27 | # List of trusted origins from which to accept POST requests 28 | # See docs/Options.md for more details 29 | LD_CSRF_TRUSTED_ORIGINS= 30 | 31 | # Database settings 32 | # These are currently only required for configuring PostreSQL. 33 | # By default, linkding uses SQLite for which you don't need to configure anything. 34 | 35 | # Database engine, can be sqlite (default) or postgres 36 | LD_DB_ENGINE= 37 | # Database name (default: linkding) 38 | LD_DB_DATABASE= 39 | # Username to connect to the database server (default: linkding) 40 | LD_DB_USER= 41 | # Password to connect to the database server 42 | LD_DB_PASSWORD= 43 | # The hostname where the database is hosted (default: localhost) 44 | LD_DB_HOST= 45 | # Port use to connect to the database server 46 | # Should use the default port if not set 47 | LD_DB_PORT= 48 | # Any additional options to pass to the database (default: {}) 49 | LD_DB_OPTIONS= 50 | -------------------------------------------------------------------------------- /update_containers.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script assumes that your docker containers are located in ~/docker. Change if necessary. 4 | # It also assumes there is a directory "~/backups" in which back-ups of the previous active container are moved. 5 | # This serves as an example script and contains only a few entries. You'll need to edit the script to suit your needs. 6 | # In this example containers 1 and 2 (bitwarden and home assistent) are backed-up completely as a tar.gz file. 7 | # The third container (Nextcloud) is not being backed-up because of the amount of data in it. 8 | # For large containers (Nextcloud, Kavita, Wiki, etc) I use alternative methods to back-up the data inside the container. 9 | 10 | 11 | # Get the username of the user that executed the script with sudo 12 | username=$SUDO_USER 13 | # Get the home directory of that user 14 | home_dir=$(eval echo "~$username") 15 | 16 | echo """ 17 | Which container do you want to update? 18 | 1 Bitwarden 19 | 2 Home Assistent 20 | 3 Nextcloud 21 | """ 22 | 23 | # Ask for directory name 24 | read -p "Enter the containernumber: " containernumber 25 | 26 | if [ $containernumber = "1" ]; then 27 | dir_name=$home_dir/docker/bitwarden 28 | elif [ $containernumber = "2" ]; then 29 | dir_name=$home_dir/docker/homeassistent 30 | elif [ $containernumber = "3" ]; then 31 | cd $home_dir/docker/nextcloud 32 | docker-compose down 33 | docker-compose pull 34 | docker-compose up -d --remove-orphans 35 | echo "The container has been updated" 36 | sleep 3 37 | exit 38 | else 39 | echo "This is an invalid choice. Program will exit now." 40 | sleep 3 41 | exit 42 | fi 43 | # Move to directory 44 | cd $dir_name 45 | 46 | # Stop running docker containers 47 | docker-compose down 48 | 49 | # Create a timestamp for the archive name 50 | timestamp=$(date +%Y-%m-%d_%H-%M-%S) 51 | 52 | # Archive directory with timestamp in name 53 | sudo tar -czvf ${dir_name}_${timestamp}.tar.gz $dir_name 54 | 55 | # Pull new image if available 56 | sudo -u $username docker-compose pull 57 | 58 | # Restart docker container 59 | docker-compose up -d --remove-orphans 60 | echo "Container $containernumber is restarted" 61 | 62 | # Move tar.gz file to backup directory 63 | sudo mv $home_dir/docker/*.tar.gz $home_dir/backups 64 | echo "Back-up moved to $home_dir/backups" 65 | sleep 2 66 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![docker](https://github.com/nomind69/docker-containers/assets/39767172/819b6da1-136c-46d3-9ed3-3b3bbbc97626) 2 | 3 | 4 | A collection of docker-compose.yml files that I use to selfhost my applications. 5 | Feel free to use these as you see fit! 6 | 7 | Here you will find an exquisite collection of docker-compose.yml files that can be used by anyone who wants to automate the process of spinning up some awesome Docker images. 8 | 9 | Before we dive in, I must remind you that this repository, like most things in life, comes with no guarantees. Use these files at your own risk, and if anything goes wrong, well... don't say I didn't warn you. 10 | 11 | Most, if not all, of the docker-compose.yml files you'll find here were written by other people who were kind enough to share them with me. I only edited them for personal fit. I am grateful for their contributions to the open-source community, and want to make sure credit is given where credit is due. 12 | 13 | The same applies for the docker images being used. 14 | 15 | Have fun exploring :-D 16 | 17 | # Services 18 | 19 | * [Bitwarden](Bitwarden/) - Great password manager. Can be used as offered at [Bitwarden.com](https://bitwarden.com/) (free for personal use) as well. 20 | * [Chatpad](Chatpad/) - ChatGPT based selfhosted AI ([website](https://chatpad.ai/)) 21 | * [DockCheck-web](DockCheck/) - Shows which docker containers have updates ([website](https://github.com/Palleri/dockcheck-web)) 22 | * [DokuWiki](Dokuwiki/) - Wiki, based on textfiles, no DB needed ([website](https://www.dokuwiki.org/dokuwiki)) 23 | * [Dozle](Dozle/) - Inspect logfiles from your docker containers ([website](https://dozzle.dev/)) 24 | * [Flame Dashboard](Flame%20Dashboard/) - Nice looking dashboard for the services you run. In-app editing. ([website](https://github.com/pawelmalak/flame)) 25 | * [Home Assistent](Home%20Assistent/) - Home automation hub ([website](https://www.home-assistant.io/)) 26 | * [Invidious](Invidious/) - Youtube frontend that filters ads and offers downloads ([website](https://invidious.io/)) 27 | * [Kanboard](Kanboard/) - Kanban application ([website](https://kanboard.org/)) 28 | * [Kavita](Kavita/) - Self-hosted library for reading and downloading books ([website](https://www.kavitareader.com/)) 29 | * [Linkding](Linkding/) - Bookmark manager (like [Raindrop](https://raindrop.io/)) that can be used with extensions for Firefox and Chrome ([website](https://github.com/sissbruecker/linkding)) 30 | * [Nextcloud](Nextcloud/) - Cloud server that offers a lot of services using plugins, file sharing ([website](https://nextcloud.com/)) 31 | * [Nginx Reverse Proxy Manager](Nginx%20Reverse%20Proxy%20Manager/) - Reverse proxy offering an easy way to use certificates (Let's Encrypt) ([website](https://nginxproxymanager.com/)) 32 | * [PiAlert](PiAlert/) - Monitor devices in your LAN ([website](https://github.com/pucherot/Pi.Alert)) 33 | * [PiHole](PiHole/) - DNS, DHCP, Ad remover ([website](https://pi-hole.net/)) 34 | * [Portainer](Portainer/) - Service for administrating docker containers, offering one-click templates as well ([website](https://www.portainer.io/)) 35 | * [Trilium Notes](Trilium%20Notes/) - Markdown Notes, lots of capablities ([website](https://github.com/zadam/trilium)) 36 | * [Unifi Controller](Unifi%20Controller/) Controller for Unifi hardware ([website](https://www.ui.com/)) 37 | * [VsCode](VsCode/) - Webbased IDE by Microsoft ([website](https://code.visualstudio.com/)) 38 | * [Wireguard Easy VPN](Wireguard%20Easy%20VPN/) - Webbased GUI for administration of Wireguard VPN connections ([website](https://github.com/wg-easy/wg-easy)) 39 | --------------------------------------------------------------------------------