This commit is contained in:
Bandie 2021-01-13 00:03:32 +01:00
parent df784e6ac8
commit 1c620679d7
Signed by: Bandie
GPG Key ID: 843D7FA93BA46312
4 changed files with 14 additions and 11 deletions

View File

@ -10,6 +10,7 @@ COPY ./www/* /www/
RUN chown -R www:www /var/lib/nginx RUN chown -R www:www /var/lib/nginx
RUN chown -R www:www /www RUN chown -R www:www /www
COPY configs/nginx.conf /etc/nginx/nginx.conf COPY configs/nginx.conf /etc/nginx/nginx.conf
RUN rm -f /etc/nginx/conf.d/*
COPY configs/envs/php7.sh /etc/profile.d/php7.sh COPY configs/envs/php7.sh /etc/profile.d/php7.sh
RUN chown www:www /var/log/php7 RUN chown www:www /var/log/php7

View File

@ -16,10 +16,10 @@ http {
access_log /var/log/nginx/access.log; access_log /var/log/nginx/access.log;
keepalive_timeout 3000; keepalive_timeout 3000;
server { server {
listen 80; listen 80 default_server;
root /www; root /www;
index index.html index.htm index.php; index index.html index.htm index.php;
server_name localhost; server_name %%DOMAIN_NAME%%;
client_max_body_size 32m; client_max_body_size 32m;
error_page 500 502 503 504 /50x.html; error_page 500 502 503 504 /50x.html;
location = /50x.html { location = /50x.html {

View File

@ -4,8 +4,6 @@ services:
container_name: gitea-webhooks container_name: gitea-webhooks
build: . build: .
restart: always restart: always
ports:
- '127.0.0.1:3002:80'
environment: environment:
- SMTP_HOST= - SMTP_HOST=
- SMTP_PORT= - SMTP_PORT=
@ -15,13 +13,14 @@ services:
- SMTP_ENCRYPTION= - SMTP_ENCRYPTION=
- SECRET_KEY= - SECRET_KEY=
- RECIPIENTS_PR= - RECIPIENTS_PR=
- DOMAIN_NAME=webhooks.chaospott.de
labels: labels:
- "traefik.frontend.rule=Host:webhooks.chaospott.de" - traefik.enable=true
- "traefik.port=3002" - traefik.frontend.rule=Host:webhooks.chaospott.de
- "traefik.docker.network=web" - traefik.port=80
- traefik.docker.network=web
networks: networks:
extern: - web
networks: networks:
extern: web:
external: external: true
name: web

View File

@ -22,6 +22,9 @@ sed -i "s/\$SMTP_HOST/$SMTP_HOST/g;s/\$SMTP_PORT/$SMTP_PORT/g;s/\$SMTP_FROM/$SMT
sed -i "s/%%SECRETKEY%%/$SECRET_KEY/g;s/%%RECIPIENTS_PR%%/$RECIPIENTS_PR/g" /www/config.php sed -i "s/%%SECRETKEY%%/$SECRET_KEY/g;s/%%RECIPIENTS_PR%%/$RECIPIENTS_PR/g" /www/config.php
sed -i "s/%%DOMAIN_NAME%%/$DOMAIN_NAME/g" /etc/nginx/nginx.conf
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
nginx nginx