-
-
Save chinaphp/d7841a53e95ccfcb3a3e031dfb8112d1 to your computer and use it in GitHub Desktop.
Revisions
-
Hsieh Chin Fan revised this gist
Oct 21, 2022 . 1 changed file with 4 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ #! /bin/sh if [ -z ${GITEA_DIR} ]; then echo Variable GITEA_DIR is not specified @@ -18,10 +18,9 @@ set -o pipefail tar c -z \ -f $BACKUP \ -g snapshot \ ${GITEA_DIR} \ 2>>log >/dev/null || { echo Fail to backup latest tar file | tee -a log exit 1 } -
Hsieh Chin Fan revised this gist
Oct 21, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ services: - 80:80 gitea: image: gitea/gitea:1.17.2 container_name: gitea env_file: .env environment: -
Hsieh Chin Fan revised this gist
Oct 21, 2022 . 1 changed file with 8 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,4 @@ #! /bin/bash if [ -z ${GITEA_DIR} ]; then echo Variable GITEA_DIR is not specified @@ -14,16 +12,16 @@ date >>log [ -e snapshot ] && touch snapshot # If tar fails, go to code block set -o pipefail tar c -z \ -f $BACKUP \ -g snapshot \ ${GITEA_DIR} 2>&1 >/dev/null | \ tee log || { echo Fail to backup latest tar file | tee log exit 1 } -
Hsieh Chin Fan revised this gist
Sep 22, 2022 . 2 changed files with 12 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,9 +23,14 @@ config: backup: DIR=`dirname $(MAKEFILE_LIST)` docker run --rm \ --volume `pwd`:/data \ --volume $$DIR:/app \ --workdir /data \ --env 'GITEA_DIR=/app/data' \ --env USERID=`id -u` \ --env GROUPID=`id -g` \ --entrypoint /bin/sh \ hellyna/tar:latest \ -c '/app/backup_gitea && chown $$USERID:$$GROUPID *' clean: rm --force snapshot log *tar.gz This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ #! /bin/sh set -x if [ -z ${GITEA_DIR} ]; then echo Variable GITEA_DIR is not specified exit 1 fi @@ -12,7 +12,7 @@ BACKUP=`date +%Y-%m-%d_%H`.tar.gz echo >>log date >>log [ -e snapshot ] && touch snapshot tar c -z \ -f $BACKUP \ -
Hsieh Chin Fan revised this gist
Jul 22, 2022 . 2 changed files with 9 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,10 +21,11 @@ config: # 0 */4 * * * make backup -f /path/to/here/Makefile >cron.log # 0 1 1 * * mv snapshot snapshot.bak && make backup -f /path/to/here/Makefile >cron.log backup: DIR=`dirname $(MAKEFILE_LIST)` docker run --rm \ -v $(MAKEFILE_LIST):/app \ alpine:3.16.0 \ sh -c 'find /app -perm 600 2>/dev/null | xargs -i chmod 666 {}' GITEA_DIR=$$DIR/data $$DIR/backup_gitea clean: rm --force snapshot log *tar.gz This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,8 +2,11 @@ set -x if [[ -z ${GITEA_DIR} ]]; then echo Variable GITEA_DIR is not specified exit 1 fi BACKUP=`date +%Y-%m-%d_%H`.tar.gz echo >>log @@ -16,6 +19,7 @@ tar c -z \ -g snapshot \ --exclude="${GITEA_DIR}/ssh/*" \ --exclude="${GITEA_DIR}/gitea/sessions/*" \ --exclude="${GITEA_DIR}/gitea/indexers/*" \ ${GITEA_DIR} \ 2>>log \ || { -
Hsieh Chin Fan revised this gist
Jul 15, 2022 . 2 changed files with 40 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,3 +14,17 @@ install: sudo systemctl start gitea.service config: docker-compose config # Use root to backup data # Example of cron jobs: # HOME=~/data/gitea # 0 */4 * * * make backup -f /path/to/here/Makefile >cron.log # 0 1 1 * * mv snapshot snapshot.bak && make backup -f /path/to/here/Makefile >cron.log backup: docker run --rm \ -v `pwd`:/app \ alpine:3.16.0 \ sh -c 'find /app -perm 600 2>/dev/null | xargs -i chmod 666 {}' `dirname $(MAKEFILE_LIST)`/backup_gitea clean: rm --force snapshot log *tar.gz This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ #! /bin/bash set -x cd `dirname $0` GITEA_DIR=${GITEA_DIR:-data} BACKUP=`date +%Y-%m-%d_%H`.tar.gz echo >>log date >>log [[ -e snapshot ]] && touch snapshot tar c -z \ -f $BACKUP \ -g snapshot \ --exclude="${GITEA_DIR}/ssh/*" \ --exclude="${GITEA_DIR}/gitea/sessions/*" \ ${GITEA_DIR} \ 2>>log \ || { echo Fail to backup latest tar file >>log exit 1 } echo Succesfully backup >>log -
Hsieh Chin Fan revised this gist
Jul 15, 2022 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,3 +31,6 @@ HOST = IS_TLS_ENABLED = true USER = PASSWD = [service] ENABLE_NOTIFY_MAIL = true -
Hsieh Chin Fan revised this gist
Jun 10, 2022 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,3 +22,12 @@ START_SSH_SERVER = true SSH_PORT = 2222 SSH_LISTEN_PORT = 2222 OFFLINE_MODE = false [mailer] ENABLED = true FROM = MAILER_TYPE = smtp HOST = IS_TLS_ENABLED = true USER = PASSWD = -
Hsieh Chin Fan revised this gist
Jun 3, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ http { listen 80; server_name localhost station.topo.tw; charset utf-8; client_max_body_size 300m; location /gitea/ { proxy_pass http://gitea/; -
Hsieh Chin Fan revised this gist
Jun 3, 2022 . 2 changed files with 8 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,12 +2,15 @@ SHELL := bash export USER_UID := $(shell id -u) export USER_GID := $(shell getent group gitea | cut -d: -f3) all: docker-compose up -d down: docker-compose down install: sudo systemctl enable `pwd`/gitea.service sudo systemctl start gitea.service config: docker-compose config This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,8 +15,10 @@ services: gitea: image: gitea/gitea:1.16.5 container_name: gitea env_file: .env environment: - USER_UID - USER_GID volumes: - ${GITEA_DATA_DIR}:/data ports: -
Hsieh Chin Fan revised this gist
Jun 2, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ .ONESHELL: SHELL := bash all: GID=`getent group gitea | cut -d: -f3` \ docker-compose up -d -
Hsieh Chin Fan revised this gist
Jun 2, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ services: - /etc/passwd:/etc/passwd:ro - /etc/group:/etc/group:ro - ./nginx.conf:/etc/nginx/nginx.conf:ro - ${DOC_DIR}:/doc ports: - 80:80 -
Hsieh Chin Fan revised this gist
Jun 2, 2022 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,6 +26,7 @@ http { } location /doc/ { autoindex on; alias /doc/; } } -
Hsieh Chin Fan revised this gist
May 30, 2022 . 2 changed files with 5 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,8 @@ services: image: nginx:alpine container_name: nginx volumes: - /etc/passwd:/etc/passwd:ro - /etc/group:/etc/group:ro - ./nginx.conf:/etc/nginx/nginx.conf:ro - /wk171/pham/doc:/doc ports: This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ worker_processes 1; user root root; events { worker_connections 1024; } http { sendfile on; @@ -25,11 +25,8 @@ http { proxy_set_header X-Forwarded-Proto $scheme; } location /doc/ { alias /doc/; } } } -
Hsieh Chin Fan revised this gist
May 30, 2022 . 2 changed files with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,5 +7,5 @@ down: GID=`getent group gitea | cut -d: -f3` \ docker-compose down install: sudo systemctl enable `pwd`/gitea.service sudo systemctl start gitea.service This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,2 +0,0 @@ -
Hsieh Chin Fan revised this gist
May 4, 2022 . 3 changed files with 17 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,3 +6,6 @@ all: down: GID=`getent group gitea | cut -d: -f3` \ docker-compose down install: sudo systemctl enable gitea.service sudo systemctl start gitea.service This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ [Unit] Description=Gitea Server with docker After=docker.service [Service] WorkingDirectory=/wk171/gitea ExecStart=/usr/local/bin/docker-compose up ExecStop=/usr/local/bin/docker-compose down Restart=always [Install] WantedBy=multi-user.target This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ sudo systemctl enable gitea.service sudo systemctl start gitea.service -
Hsieh Chin Fan revised this gist
May 4, 2022 . 2 changed files with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ .ONESHELL: all: GID=`getent group gitea | cut -d: -f3` \ docker-compose up -d down: GID=`getent group gitea | cut -d: -f3` \ docker-compose down This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,6 +13,7 @@ services: gitea: image: gitea/gitea:1.16.5 container_name: gitea user: 0:${GID} env_file: .env volumes: - ${GITEA_DATA_DIR}:/data -
Hsieh Chin Fan revised this gist
May 4, 2022 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,2 @@ .env data/ -
Hsieh Chin Fan revised this gist
Apr 1, 2022 . 1 changed file with 24 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ APP_NAME = Gitea RUN_MODE = prod RUN_USER = git [repository] ROOT = /data/git/repositories [repository.local] LOCAL_COPY_PATH = /data/gitea/tmp/local-repo [repository.upload] TEMP_PATH = /data/gitea/uploads [server] APP_DATA_PATH = /data/gitea DOMAIN = 0.0.0.0 SSH_DOMAIN = 0.0.0.0 HTTP_PORT = 3000 ROOT_URL = http://0.0.0.0/gitea/ DISABLE_SSH = false START_SSH_SERVER = true SSH_PORT = 2222 SSH_LISTEN_PORT = 2222 OFFLINE_MODE = false -
Hsieh Chin Fan revised this gist
Apr 1, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ services: - 80:80 gitea: image: gitea/gitea:1.16.5 container_name: gitea env_file: .env volumes: -
Hsieh Chin Fan revised this gist
Apr 1, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,6 +16,8 @@ services: env_file: .env volumes: - ${GITEA_DATA_DIR}:/data ports: - 2222:2222 networks: default: -
Hsieh Chin Fan revised this gist
Apr 1, 2022 . 3 changed files with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ GITEA_DATA_DIR=/tmp/gitea This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ .env This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,8 +13,9 @@ services: gitea: image: gitea/gitea:latest container_name: gitea env_file: .env volumes: - ${GITEA_DATA_DIR}:/data networks: default: -
Hsieh Chin Fan revised this gist
Mar 15, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,9 @@ http { server { listen 80; server_name localhost station.topo.tw; charset utf-8; client_max_body_size 200m; location /gitea/ { proxy_pass http://gitea/; -
Hsieh Chin Fan revised this gist
Mar 15, 2022 . 2 changed files with 6 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ services: container_name: nginx volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro - /wk171/pham/doc:/doc ports: - 80:80 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,8 +23,11 @@ http { proxy_set_header X-Forwarded-Proto $scheme; } location /doc/docker/ { alias /doc/docker/; } location /doc/git { alias /doc/git/; } } } -
Hsieh Chin Fan revised this gist
Feb 22, 2022 . 2 changed files with 8 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,14 +6,15 @@ services: container_name: nginx volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro - /wk171/pham/docker:/doc ports: - 80:80 gitea: image: gitea/gitea:latest container_name: gitea volumes: - /wk171/pham/gitea:/data networks: default: This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,26 +10,21 @@ http { server gitea:3000; } server { listen 80; charset utf-8; location /gitea/ { proxy_pass http://gitea/; proxy_redirect off; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } location /doc { alias /doc/; } } } -
Hsieh Chin Fan revised this gist
Feb 22, 2022 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,10 +10,10 @@ http { server gitea:3000; } # map $http_upgrade $connection_upgrade { # default upgrade; # '' close; # } server { listen 80; @@ -22,14 +22,14 @@ http { proxy_pass http://gitea; proxy_redirect off; #proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # websocket headers #proxy_set_header Upgrade $http_upgrade; #proxy_set_header Connection $connection_upgrade; } } } -
Hsieh Chin Fan revised this gist
Feb 22, 2022 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,8 +3,9 @@ services: nginx: image: nginx:alpine container_name: nginx volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro ports: - 80:80 @@ -14,5 +15,6 @@ services: volumes: - /var/lib/gitea:/data networks: default: name: gitea -
Hsieh Chin Fan created this gist
Feb 16, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ version: "3.7" services: nginx: image: nginx:alpine volumes: - "./nginx.conf:/etc/nginx/nginx.conf:ro" ports: - 80:80 gitea: image: gitea/gitea:latest container_name: gitea volumes: - /var/lib/gitea:/data volumes: data: This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ worker_processes 1; events { worker_connections 1024; } http { sendfile on; upstream gitea { server gitea:3000; } map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { listen 80; location / { proxy_pass http://gitea; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # websocket headers proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; } } }