Last active
April 5, 2021 09:36
-
-
Save wolkenschieber/c974cb05b3bca6f0264ad5e471edfd1c to your computer and use it in GitHub Desktop.
Traefik-Infrastucture (Traefik + Nextcloud on Postgres + NO HTTPS )
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
version: "3.9" | |
services: | |
db: | |
image: postgres:13.2 | |
container_name: nextcloud-database | |
restart: always | |
volumes: | |
- ./nextcloud-database:/var/lib/postgresql/data | |
environment: | |
- POSTGRES_DB=nextclouddb | |
- POSTGRES_USER=nextcloud | |
- POSTGRES_PASSWORD=vahdoaz9Sasai8ooPhe0cai7taiwei4r | |
networks: | |
- nextcloud-internal | |
nextcloud-app: | |
image: nextcloud:21 | |
container_name: nextcloud | |
restart: always | |
depends_on: | |
- db | |
volumes: | |
- ./nextcloud-data:/var/www/html | |
environment: | |
- POSTGRES_HOST=db | |
- POSTGRES_DB=nextclouddb | |
- POSTGRES_USER=nextcloud | |
- POSTGRES_PASSWORD=vahdoaz9Sasai8ooPhe0cai7taiwei4r | |
networks: | |
- traefik-gateway | |
- nextcloud-internal | |
labels: | |
- "traefik.enable=true" | |
- "traefik.http.routers.nextcloud.rule=Host(`subdomain.domain.tld`)" | |
- "traefik.http.routers.nextcloud.entrypoints=web" | |
- "traefik.http.services.nextcloud-app.loadbalancer.server.port=80" | |
- "traefik.docker.network=traefik-gateway" | |
networks: | |
nextcloud-internal: | |
external: false | |
traefik-gateway: | |
external: true |
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
version: "3.9" | |
services: | |
reverse-proxy: | |
# The official v2 Traefik docker image | |
image: "traefik:v2.4" | |
container_name: "traefik" | |
# Enables the web UI and tells Traefik to listen to docker | |
command: | |
- "--log.level=DEBUG" | |
- "--api.insecure=true" | |
- "--providers.docker=true" | |
- "--providers.docker.exposedbydefault=false" | |
- "--entrypoints.web.address=:80" | |
ports: | |
# The HTTP port | |
- "80:80" | |
# The Web UI (enabled by --api.insecure=true) | |
- "8080:8080" | |
volumes: | |
# So that Traefik can listen to the Docker events | |
- /var/run/docker.sock:/var/run/docker.sock | |
networks: | |
- traefik-gateway | |
networks: | |
traefik-gateway: | |
external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment