From 67af34231db6748beb73c9db4b3a5eba06bfefeb Mon Sep 17 00:00:00 2001 From: Steph Date: Fri, 5 Feb 2021 15:33:54 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=89=20First=20commit!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 1 + .gitignore | 2 ++ backup.conf | 14 ++++++++++++++ docker-compose.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ nginx.conf | 1 + 5 files changed, 63 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 backup.conf create mode 100644 docker-compose.yml create mode 100644 nginx.conf diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..caeb545 --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +DOMAIN=example.com diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..161341f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +mnt/ +.env diff --git a/backup.conf b/backup.conf new file mode 100644 index 0000000..12591d9 --- /dev/null +++ b/backup.conf @@ -0,0 +1,14 @@ +## Backup config file for service. To find the syntax for this file, +## take a look at `man duplicity` or the web docs at this url: +## http://duplicity.nongnu.org/vers8/duplicity.1.html#sect9 +## +## Special syntax has been added, a single pound sign line will be +## interpreted like a variable assignment, a line with two pound +## signs will be seen as comments. + + +## This make daily backups, and keep them for one months, making +## incremental backups and doing a full backup once a week. +# RETAIN=2W +# INCREMENT=1W +# INTERVAL=1D diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..aab6734 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,45 @@ +version: "3" + +services: + server: + image: gitea/gitea:1 + environment: + - "USER_UID=0" + - "USER_GID=0" + - "DB_TYPE=postgres" + - "DB_HOST=db:5432" + - "DB_NAME=gitea" + - "DB_USER=gitea" + - "DB_PASSWD=gitea" + - "VIRTUAL_HOST=${DOMAIN}" + - "VIRTUAL_PORT=3000" + - "LETSENCRYPT_HOST=${DOMAIN}" + - "APP_NAME=Git" + - "DOMAIN=${DOMAIN}" + - "DISABLE_SSH=true" + restart: always + networks: + - default + - 10000-nginx-proxy_nginx-proxy + volumes: + - ./mnt/gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + depends_on: + - db + + db: + image: postgres:9.6 + restart: always + environment: + - "POSTGRES_USER=gitea" + - "POSTGRES_PASSWORD=gitea" + - "POSTGRES_DB=gitea" + expose: + - 5432 + volumes: + - ./mnt/postgres:/var/lib/postgresql/data + +networks: + 10000-nginx-proxy_nginx-proxy: + external: true diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..2d6b06b --- /dev/null +++ b/nginx.conf @@ -0,0 +1 @@ +client_max_body_size 256m;