Usage of .env; hosts_append in start.sh
This commit is contained in:
parent
6fff0a53a1
commit
7483233c33
13
.env-example
Normal file
13
.env-example
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
DOMAIN_NAME=bla.domain.tld
|
||||||
|
|
||||||
|
SMTP_HOST=mail.domain.tld
|
||||||
|
SMTP_PORT=587
|
||||||
|
SMTP_FROM=gitea@domain.tld
|
||||||
|
SMTP_USER=gitea@domain.tld
|
||||||
|
SMTP_PASSWORD=
|
||||||
|
SMTP_ENCRYPTION=starttls
|
||||||
|
SECRET_KEY=averybigsecretapikey
|
||||||
|
|
||||||
|
|
||||||
|
RECIPIENTS_PR='mail@domain.tld','mail2@domain.tld'
|
||||||
|
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.env
|
@ -25,7 +25,6 @@ COPY configs/msmtprc /etc/msmtprc
|
|||||||
COPY configs/aliases /etc/aliases
|
COPY configs/aliases /etc/aliases
|
||||||
|
|
||||||
COPY configs/hosts /etc/hosts_append
|
COPY configs/hosts /etc/hosts_append
|
||||||
RUN cat /etc/hosts_append >> /etc/hosts
|
|
||||||
|
|
||||||
COPY start.sh /start.sh
|
COPY start.sh /start.sh
|
||||||
RUN chmod +x /start.sh
|
RUN chmod +x /start.sh
|
||||||
|
@ -5,18 +5,18 @@ services:
|
|||||||
build: .
|
build: .
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
- SMTP_HOST=
|
- SMTP_HOST=${SMTP_HOST}
|
||||||
- SMTP_PORT=
|
- SMTP_PORT=${SMTP_PORT}
|
||||||
- SMTP_FROM=
|
- SMTP_FROM=${SMTP_FROM}
|
||||||
- SMTP_USER=
|
- SMTP_USER=${SMTP_USER}
|
||||||
- SMTP_PASSWORD=
|
- SMTP_PASSWORD=${SMTP_PASSWORD}
|
||||||
- SMTP_ENCRYPTION=
|
- SMTP_ENCRYPTION=${SMTP_ENCRYPTION}
|
||||||
- SECRET_KEY=
|
- SECRET_KEY=${SECRET_KEY}
|
||||||
- RECIPIENTS_PR=
|
- RECIPIENTS_PR=${RECIPIENTS_PR}
|
||||||
- DOMAIN_NAME=webhooks.chaospott.de
|
- DOMAIN_NAME=${DOMAIN_NAME}
|
||||||
labels:
|
labels:
|
||||||
- traefik.enable=true
|
- traefik.enable=true
|
||||||
- traefik.frontend.rule=Host:webhooks.chaospott.de
|
- traefik.frontend.rule=Host:${DOMAIN_NAME}
|
||||||
- traefik.port=80
|
- traefik.port=80
|
||||||
- traefik.docker.network=web
|
- traefik.docker.network=web
|
||||||
networks:
|
networks:
|
||||||
|
2
start.sh
2
start.sh
@ -24,6 +24,8 @@ sed -i "s/%%SECRETKEY%%/$SECRET_KEY/g;s/%%RECIPIENTS_PR%%/$RECIPIENTS_PR/g;s/%%S
|
|||||||
|
|
||||||
sed -i "s/%%DOMAIN_NAME%%/$DOMAIN_NAME/g" /etc/nginx/nginx.conf
|
sed -i "s/%%DOMAIN_NAME%%/$DOMAIN_NAME/g" /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
cat /etc/hosts_append >> /etc/hosts
|
||||||
|
|
||||||
|
|
||||||
chown www:www /var/log/nginx/*
|
chown www:www /var/log/nginx/*
|
||||||
ln -sf /usr/bin/msmtp /usr/sbin/sendmail
|
ln -sf /usr/bin/msmtp /usr/sbin/sendmail
|
||||||
|
Loading…
Reference in New Issue
Block a user