Compare commits

...

4 Commits

Author SHA1 Message Date
0532b15b9c
update hugo static build for alphine 2024-11-03 17:51:10 +01:00
727a45f563
try outdated api 2024-09-21 16:01:38 +02:00
36b0e12872
spf conf 2024-09-21 11:54:58 +02:00
274912d318
minor patch before moving to cloudflare 2024-09-21 11:53:52 +02:00
4 changed files with 15 additions and 31 deletions

View File

@ -6,16 +6,17 @@ LABEL maintainer="Lieuwe Leene <lieuwe@leene.dev>"
ARG HUGO_BASE="localhost" ARG HUGO_BASE="localhost"
ARG SSL_ALGO=secp521r1 ARG SSL_ALGO=secp521r1
RUN wget -O - "https://github.com/gohugoio/hugo/releases/download/$(wget -O - https://api.github.com/repos/gohugoio/hugo/releases/latest | grep -om 1 "/v[0-9.]*/hugo_[0-9.]*_Linux-64bit.tar.gz")" | tar -xz -C /tmp \ RUN wget -O - "https://github.com/gohugoio/hugo/releases/download/$(wget -O - https://api.github.com/repos/gohugoio/hugo/releases/latest | grep -om 1 "v[0-9.]*/hugo_extended_[0-9.]*_Linux-64bit.tar.gz")" | tar -xz -C /tmp \
&& mkdir -p /usr/local/sbin \ && mkdir -p /usr/local/sbin \
&& mv /tmp/hugo /usr/local/sbin/hugo \ && mv /tmp/hugo /usr/local/sbin/hugo \
&& rm -rf /tmp/${HUGO_ID}_linux_amd64 \ && rm -rf /tmp/${HUGO_ID}_linux_amd64 \
&& rm -rf /tmp/LICENSE.md \ && rm -rf /tmp/LICENSE.md \
&& rm -rf /tmp/README.md && rm -rf /tmp/README.md
RUN apk add --update git asciidoctor libc6-compat libstdc++ \ RUN apk add --update git gcompat asciidoctor libc6-compat libstdc++ \
&& apk upgrade \ && apk upgrade \
&& apk add --no-cache ca-certificates \ && apk add --no-cache ca-certificates \
&& ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 \
&& git clone https://github.com/lleene/hugo-site.git /src \ && git clone https://github.com/lleene/hugo-site.git /src \
&& git clone https://github.com/lleene/hermit.git /src/themes/hermit \ && git clone https://github.com/lleene/hermit.git /src/themes/hermit \
&& /usr/local/sbin/hugo -b ${BASE_URL}/ -s /src -d /public --minify && /usr/local/sbin/hugo -b ${BASE_URL}/ -s /src -d /public --minify

View File

@ -0,0 +1,2 @@
Whitelist = 192.168.0.0/31,192.168.1.0/30
Domain_Whitelist = dockerize_internalnet

View File

@ -7,7 +7,7 @@ networks:
x-mail: x-mail:
&defaults &defaults
restart: always restart: unless-stopped
env_file: local.env env_file: local.env
networks: networks:
- internalnet - internalnet
@ -16,32 +16,14 @@ services:
certbot: certbot:
<<: *defaults <<: *defaults
image: ghcr.io/aaomidi/certbot-dns-google-domains:latest image: certbot/dns-cloudflare
container_name: certbot container_name: certbot
command: > command: certonly --non-interactive --dns-cloudflare --dns-cloudflare-credentials /config/credentials.ini --agree-tos --email admin@${NGINX_HOST} -d ${NGINX_HOST} -d lieuwe.${NGINX_HOST} -d mail.${NGINX_HOST} -d inbox.${NGINX_HOST} -d nextcloud.${NGINX_HOST} -d git.${NGINX_HOST} -d autodiscover.${NGINX_HOST} --server https://acme-v02.api.letsencrypt.org/directory
sh -c "certbot certonly --authenticator dns-google-domains --dns-google-domains-credentials /var/lib/letsencrypt/dns_google_domains_credentials.ini --server https://acme-v02.api.letsencrypt.org/directory --non-interactive --dns-google-domains-zone ${NGINX_HOST} --agree-tos --email admin@${NGINX_HOST} -d ${NGINX_HOST} -d mail.${NGINX_HOST} -d inbox.${NGINX_HOST} -d lieuwe.${NGINX_HOST} -d nextcloud.${NGINX_HOST} -d git.${NGINX_HOST} -d autodiscover.${NGINX_HOST}"
volumes: volumes:
- certbot_state:/var/lib/letsencrypt:z - certbot_state:/var/lib/letsencrypt:z
- nginx_archive:/etc/letsencrypt/archive:z - nginx_archive:/etc/letsencrypt/archive:z
- nginx_certs:/etc/letsencrypt/live:z - nginx_certs:/etc/letsencrypt/live:z
- ./config/nginx/credentials.ini:/var/lib/letsencrypt/dns_google_domains_credentials.ini:ro,z - ./config/nginx/credentials.ini:/config/credentials.ini:z
ddnsgd:
<<: *defaults
container_name: "ddnsgd"
image: "ghcr.io/dominickbrasileiro/ddnsgd"
environment:
- HOSTNAME=${NGINX_HOST}
- USERNAME=${GDNS_USERNAME}
- PASSWORD=${GDNS_PASSWORD}
- INTERVAL=9000
healthcheck:
test: /usr/bin/nslookup ${NGINX_HOST}
interval: 30s
retries: 5
start_period: 2s
timeout: 10s
hugo-html: hugo-html:
networks: networks:
@ -195,6 +177,7 @@ services:
- mail_data:/var/mail/:z - mail_data:/var/mail/:z
- mail_state:/var/mail-state/:z - mail_state:/var/mail-state/:z
- mail_config:/tmp/docker-mailserver/:z - mail_config:/tmp/docker-mailserver/:z
- ./config/mail/postfix-policyd-spf.conf:/etc/postfix-policyd-spf-python/policyd-spf.conf:ro,z
cap_add: cap_add:
- NET_ADMIN - NET_ADMIN
@ -220,10 +203,6 @@ services:
- ./config/nginx/nextcloud_location:/etc/nginx/vhost.d/nextcloud.${NGINX_HOST}_location:ro,z - ./config/nginx/nextcloud_location:/etc/nginx/vhost.d/nextcloud.${NGINX_HOST}_location:ro,z
- ./config/nginx/header_default:/etc/nginx/vhost.d/default:z - ./config/nginx/header_default:/etc/nginx/vhost.d/default:z
- /var/run/docker.sock:/tmp/docker.sock:ro,z - /var/run/docker.sock:/tmp/docker.sock:ro,z
depends_on:
ddnsgd:
condition: service_healthy
volumes: volumes:
certbot_state: certbot_state:

View File

@ -52,8 +52,10 @@ GITEA__server__HTTP_PORT = 3000
GITEA__server__DISABLE_SSH = false GITEA__server__DISABLE_SSH = false
GITEA__server__SSH_PORT = 222 GITEA__server__SSH_PORT = 222
GITEA__server__SSH_LISTEN_PORT = 222 GITEA__server__SSH_LISTEN_PORT = 222
GITEA__server__DISABLE_REGISTRATION = true
GITEA__mailer__ENABLED = true GITEA__mailer__ENABLED = true
GITEA__mailer__PROTOCOL = smtp GITEA__mailer__PROTOCOL = sendmail
GITEA__mailer__SMTP_ADDR = mailserver GITEA__mailer__FROM = admin@leene.dev
GITEA__mailer__SMTP_PORT = 25 GITEA__mailer__SENDMAIL_ARGS = -S mailserver --