Restructered repository and added dockerfiles.
This commit is contained in:
parent
6f626ea686
commit
25dde6a119
8 changed files with 86 additions and 22 deletions
|
@ -1,17 +0,0 @@
|
|||
version: '3.0'
|
||||
|
||||
services:
|
||||
portainer:
|
||||
container_name: portainer
|
||||
image: portainer/portainer-ce:latest
|
||||
restart: always
|
||||
stdin_open: true
|
||||
tty: true
|
||||
network_mode: bridge
|
||||
ports:
|
||||
- "9000:9000/tcp"
|
||||
environment:
|
||||
- TZ=Europe/Amsterdam
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /opt/portainer:/data
|
|
@ -1,5 +1,5 @@
|
|||
traefik.enable=true
|
||||
traefik.http.routers..entrypoints={web/websecure/webfederation}
|
||||
traefik.http.routers..entrypoints={web,websecure,webfederation}
|
||||
traefik.http.routers..rule=Host("")
|
||||
traefik.http.routers..tls=true
|
||||
traefik.http.routers..tls.certresolver={staging/production}
|
||||
|
|
34
docker-compose/base.yaml
Normal file
34
docker-compose/base.yaml
Normal file
|
@ -0,0 +1,34 @@
|
|||
version: '3.0'
|
||||
|
||||
services:
|
||||
portainer:
|
||||
container_name: portainer
|
||||
image: portainer/portainer-ce:alpine
|
||||
network_mode: bridge
|
||||
ports:
|
||||
- "9000:9000/tcp"
|
||||
volumes:
|
||||
- /etc/localtime/:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ~/docker/portainer:/data
|
||||
restart: always
|
||||
|
||||
watchtower:
|
||||
container_name: watchtower
|
||||
image: containrrr/watchtower:latest
|
||||
network_mode: bridge
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
WATCHTOWER_NOTIFICATION_EMAIL_FROM = info@{domain}
|
||||
WATCHTOWER_NOTIFICATION_EMAIL_TO=user@{domain}
|
||||
WATCHTOWER_NOTIFICATION_EMAIL_SERVER=mail.{domain}
|
||||
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT=465
|
||||
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=info
|
||||
WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD={passwd}
|
||||
WATCHTOWER_NOTIFICATION_EMAIL_DELAY=2
|
||||
WATCHTOWER_NOTIFICATIONS=email
|
||||
WATCHTOWER_SCHEDULE=0 0 0 * * 6
|
||||
WATCHTOWER_CLEANUP=true
|
||||
restart: unless-stopped
|
|
@ -4,7 +4,6 @@ services:
|
|||
traefik:
|
||||
container_name: traefik
|
||||
image: traefik:latest
|
||||
restart: unless-stopped
|
||||
command:
|
||||
#- --api.insecure=true
|
||||
#- --api.dashboard=true
|
||||
|
@ -27,18 +26,19 @@ services:
|
|||
- --certificatesresolvers.production.acme.storage=/ssl-certs/acme.json
|
||||
- --certificatesresolvers.production.acme.caServer=https://acme-v02.api.letsencrypt.org/directory
|
||||
- --certificatesresolvers.production.acme.httpChallenge.entryPoint=web
|
||||
networks:
|
||||
proxy:
|
||||
ipv4_address: 172.21.0.80
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
#- "8080:8080"
|
||||
- "8448:8448"
|
||||
networks:
|
||||
proxy:
|
||||
ipv4_address: 172.21.0.80
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /opt/traefik/ssl-certs:/ssl-certs
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
proxy:
|
15
dockerfile/git-mkdocs/dev-mkdocs.dockerfile
Normal file
15
dockerfile/git-mkdocs/dev-mkdocs.dockerfile
Normal file
|
@ -0,0 +1,15 @@
|
|||
FROM python:3-alpine
|
||||
|
||||
ARG USER=1001
|
||||
|
||||
RUN adduser -h /usr/src/mkdocs -D -u $USER mkdocs
|
||||
|
||||
USER mkdocs
|
||||
RUN mkdir -p /usr/src/mkdocs/build
|
||||
WORKDIR /usr/src/mkdocs/build
|
||||
|
||||
RUN pip install --upgrade pip
|
||||
|
||||
RUN pip install pymdown-extensions \
|
||||
&& pip install mkdocs \
|
||||
&& pip install mkdocs-material
|
24
dockerfile/git-mkdocs/git-mkdocs.dockerfile
Normal file
24
dockerfile/git-mkdocs/git-mkdocs.dockerfile
Normal file
|
@ -0,0 +1,24 @@
|
|||
FROM nginx:alpine
|
||||
|
||||
RUN apk add git \
|
||||
&& apk add python3 py3-pip
|
||||
|
||||
ENV GIT_REPO_URL='' \
|
||||
GIT_REPO_NAME=''
|
||||
|
||||
RUN mkdir /mkdocs
|
||||
WORKDIR /mkdocs
|
||||
|
||||
RUN pip install --upgrade pip
|
||||
|
||||
RUN pip install pymdown-extensions \
|
||||
&& pip install mkdocs \
|
||||
&& pip install mkdocs-material
|
||||
|
||||
COPY root /etc/crontabs/root
|
||||
COPY git-mkdocs /bin/git-mkdocs
|
||||
RUN chmod 744 /bin/git-mkdocs
|
||||
|
||||
RUN touch /docker-entrypoint.d/cron.sh \
|
||||
&& echo "exec crond" > /docker-entrypoint.d/cron.sh \
|
||||
&& chmod 776 /docker-entrypoint.d/cron.sh
|
5
dockerfile/git-mkdocs/scripts/git-mkdocs
Normal file
5
dockerfile/git-mkdocs/scripts/git-mkdocs
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
git clone $GIT_REPO_URL
|
||||
cd /mkdocs/$GIT_REPO_NAME
|
||||
git pull
|
||||
mkdocs build -f /mkdocs/$GIT_REPO_NAME/mkdocs.yml -d /usr/share/nginx/html
|
3
dockerfile/git-mkdocs/scripts/root
Normal file
3
dockerfile/git-mkdocs/scripts/root
Normal file
|
@ -0,0 +1,3 @@
|
|||
# do daily/weekly/monthly maintanance
|
||||
# min hour day month weekday command
|
||||
* * * * * git-mkdocs
|
Loading…
Reference in a new issue