first commit

This commit is contained in:
Nicholas Yeoman
2020-02-28 13:34:18 -08:00
commit 027d2926ba
4 changed files with 105 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
# docker-compose-cookbooks
+33
View File
@@ -0,0 +1,33 @@
version: '3.3'
volumes:
gitea:
networks:
traefik_web:
external:
name: traefik_web
services:
gitea:
image: gitea/gitea:latest
networks:
- traefik_web
environment:
- USER_UID=1000
- USER_GID=1000
restart: always
volumes:
- gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "222:22"
labels:
- "traefik.enable=true"
- "traefik.http.routers.gitea.rule=Host(`gitea.nickyeoman.com`)"
- "traefik.http.routers.gitea.entrypoints=websecure"
- "traefik.http.routers.gitea.tls=true"
- "traefik.http.services.gite.loadbalancer.server.port=3000"
+28
View File
@@ -0,0 +1,28 @@
version: '3.3'
volumes:
portainer:
networks:
traefik_web:
external:
name: traefik_web
services:
portainer:
image: portainer/portainer
command: -H unix:///var/run/docker.sock
restart: always
networks:
- traefik_web
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer:/data
command: -H unix:///var/run/docker.sock
labels:
- "traefik.enable=true"
- "traefik.http.routers.portainer.rule=Host(`portainer.nickyeoman.com`)"
- "traefik.http.routers.portainer.entrypoints=websecure"
- "traefik.http.routers.portainer.tls=true"
- "traefik.http.services.portainer.loadbalancer.server.port=9000"
+43
View File
@@ -0,0 +1,43 @@
# must create network first:
# docker network create web
# TODO: clean up this file with atom
version: '3.3'
networks:
web:
driver: bridge
services:
traefik:
image: "traefik:v2.1.3"
container_name: "traefik"
restart: unless-stopped
command:
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
- --api
- --providers.docker
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- web
labels:
# Dashboard
- "traefik.http.routers.traefik.rule=Host(`proxy.nickyeoman.com`)"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.traefik.tls.certresolver=leresolver"
- "traefik.http.routers.traefik.entrypoints=websecure"
- "traefik.http.routers.traefik.middlewares=authtraefik"
- "traefik.http.middlewares.authtraefik.basicauth.users=nick:$$apr1$$9Bb9ylLo$$01sClSThg7OMbRg7Qj3re0"
# global redirect to https
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.http-catchall.entrypoints=web"
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
# middleware redirect
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"