Created
September 22, 2019 11:06
-
-
Save fdavidcl/946810b79367a52c4960c1df7563ba6d to your computer and use it in GitHub Desktop.
Docker Compose config for self hosting stuff
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
#------------------------------------------------------------- | |
# David's master Dockerfile for self-hosted services in a | |
# Raspberry Pi 4 | |
# | |
# Contents: | |
# 8001: pihole HTTP | |
# 8002: pihole HTTPS | |
# 8011: gitea HTTPS | |
# 2211: gitea SSH | |
# 8021: nextcloud HTTPS | |
# 8031: pleroma HTTPS | |
# 8041: TT-RSS HTTP | |
#------------------------------------------------------------- | |
version: "3.4" | |
services: | |
pihole: | |
container_name: pihole | |
image: pihole/pihole:latest | |
ports: | |
- "53:53/tcp" | |
- "53:53/udp" | |
- "67:67/udp" | |
- "8001:80/tcp" | |
- "8002:443/tcp" | |
environment: | |
TZ: 'Europe/Madrid' | |
# WEBPASSWORD: 'set a secure password here or it will be random' | |
# Volumes store your data between container upgrades | |
volumes: | |
- './etc-pihole/:/etc/pihole/' | |
- './etc-dnsmasq.d/:/etc/dnsmasq.d/' | |
dns: | |
- 127.0.0.1 | |
- 1.1.1.1 | |
# Recommended but not required (DHCP needs NET_ADMIN) | |
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities | |
cap_add: | |
- NET_ADMIN | |
restart: unless-stopped | |
gitea: | |
image: kunde21/gitea-arm | |
environment: | |
- USER_UID=1000 | |
- USER_GID=1000 | |
- ROOT_ID=PASSWORD | |
- DB_TYPE=postgres | |
- DB_HOST=db:5432 | |
- DB_NAME=gitea | |
- DB_PASSWD=PASSWORD | |
- ROOT_URL=example.org | |
restart: always | |
links: | |
- pg_gitea | |
volumes: | |
- ./gitea:/data | |
ports: | |
- "8011:3000" | |
- "2211:22" | |
depends_on: | |
- pg_gitea | |
pg_gitea: | |
image: postgres:9.6-alpine | |
container_name: postgres_gitea | |
restart: always | |
environment: | |
POSTGRES_USER: gitea | |
POSTGRES_PASSWORD: PASSWORD | |
POSTGRES_DB: gitea | |
volumes: | |
- ./pg_gitea:/var/lib/postgresql/data | |
nextcloud: | |
image: nextcloud | |
ports: | |
- 8021:80 | |
links: | |
- pg_nextcloud | |
volumes: | |
- ./nextcloud:/var/www/html | |
- /media/datos/cloud_data:/var/www/html/data | |
restart: always | |
environment: | |
- POSTGRES_HOST=pg_nextcloud | |
- POSTGRES_DB=nextcloud | |
- POSTGRES_USER=postgres | |
- POSTGRES_PASSWORD=PASSWORD | |
depends_on: | |
- pg_nextcloud | |
pg_nextcloud: | |
image: postgres:9.6-alpine | |
container_name: postgres_nextcloud | |
restart: always | |
environment: | |
- POSTGRES_USER=postgres | |
- POSTGRES_PASSWORD=PASSWORD | |
volumes: | |
- ./pg_nextcloud:/var/lib/postgresql/data | |
# pg_pleroma: | |
# image: postgres:9.6-alpine | |
# container_name: postgres_pleroma | |
# restart: always | |
# environment: | |
# - POSTGRES_USER=pleroma | |
# - POSTGRES_PASSWORD=PASSWORD | |
# - POSTGRES_DB=pleroma | |
# volumes: | |
# - ./pg_pleroma:/var/lib/postgresql/data | |
# pleroma: | |
# # build: . | |
# image: pandentia/pleroma | |
# container_name: pleroma_web | |
# restart: always | |
# ports: | |
# - "8031:80" | |
# volumes: | |
# - ./uploads:/pleroma/uploads | |
# depends_on: | |
# - pg_pleroma | |
tt-rss: | |
image: linuxserver/tt-rss | |
container_name: tt-rss | |
environment: | |
- PUID=1000 | |
- PGID=1000 | |
- TZ=Europe/Madrid | |
volumes: | |
- ./ttrss:/config | |
ports: | |
- 8041:80 | |
links: | |
- pg_ttrss | |
restart: unless-stopped | |
depends_on: | |
- pg_ttrss | |
pg_ttrss: | |
image: postgres:9.6-alpine | |
container_name: postgres_ttrss | |
restart: always | |
environment: | |
POSTGRES_USER: ttrss | |
POSTGRES_PASSWORD: PASSWORD | |
POSTGRES_DB: ttrss | |
volumes: | |
- ./pg_ttrss:/var/lib/postgresql/data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment