Added initial gitea config

pull/13/head
Jef Roosens 2021-04-23 16:32:54 +02:00
parent d13573f87d
commit 0a6ffbf67d
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
4 changed files with 111 additions and 7 deletions

16
gitea/.env.example 100644
View File

@ -0,0 +1,16 @@
# User to run container as
USER_UID=1000
USER_GID=1000
# Database settings
DB_TYPE=postgres
DB_HOST=db:5432
DB_NAME=gitea
DB_USER=gitea
DB_PASSWD=gitea
# Wether to start LFS
LFS_START_SERVER=true
# Wether to allow registration
DISABLE_REGISTRATION=true

View File

@ -0,0 +1,59 @@
version: '2.4'
services:
app:
# Latest contains a development version
image: 'gitea/gitea:1.14.1-rootless'
restart: 'always'
depends_on:
db:
condition: 'service_healthy'
healthcheck:
test: 'curl -f localhost:3000 || exit 1'
interval: '30s'
timeout: '5s'
retries: 3
start_period: '5s'
env_file:
- '.env'
networks:
- 'default'
- 'nginx'
ports:
- '22:22'
volumes:
- 'data:/data'
- 'repos:/data/git/repositories'
- 'lfs:/data/git/lfs'
- '/etc/timezone:/etc/timezone:ro'
- '/etc/localtime:/etc/localtime:ro'
db:
image: 'postgres:13.2-alpine'
restart: 'always'
healthcheck:
test: 'pg_isready -U gitea'
interval: '30s'
timeout: '5s'
retries: 3
start_period: '0s'
environment:
- 'POSTGRES_USER=gitea'
- 'POSTGRES_PASSWORD=gitea'
- 'POSTGRES_DB=gitea'
volumes:
- 'db-data:/var/lib/postgresql/data'
networks:
nginx:
external: true
volumes:
data:
lfs:
db-data:
repos:

View File

@ -14,40 +14,46 @@ HTTPS_PORT=443
# =====PER-SERVICE CONFIGURATION===== # =====PER-SERVICE CONFIGURATION=====
# Domain name: domain name that points to the instance # Domain name: domain name that points to the instance
# Host name: basically the argument to proxy_pass # Hostname: basically the argument to proxy_pass
## Firefly III ## Firefly III
### Domain name ### Domain name
FIREFLY_DOMAIN= FIREFLY_DOMAIN=
### Host name ### Hostname
FIREFLY_HOST=firefly_app_1 FIREFLY_HOST=firefly_app_1
## Koel ## Koel
### Domain name ### Domain name
KOEL_DOMAIN= KOEL_DOMAIN=
### Host name ### Hostname
KOEL_HOST=koel_app_1 KOEL_HOST=koel_app_1
## Miniflux ## Miniflux
### Domain name ### Domain name
MINIFLUX_DOMAIN= MINIFLUX_DOMAIN=
### Host name ### Hostname
MINIFLUX_HOST=miniflux_app_1 MINIFLUX_HOST=miniflux_app_1
## Monica ## Monica
### Domain name ### Domain name
MONICA_DOMAIN= MONICA_DOMAIN=
### Host name ### Hostname
MONICA_HOST=monica_app_1 MONICA_HOST=monica_app_1
## Nextcloud ## Nextcloud
### Domain name ### Domain name
NEXTCLOUD_DOMAIN= NEXTCLOUD_DOMAIN=
### Host name ### Hostname
NEXTCLOUD_HOST=nextcloud_app_1 NEXTCLOUD_HOST=nextcloud_app_1
## Portainer ## Portainer
### Domain name ### Domain name
PORTAINER_DOMAIN= PORTAINER_DOMAIN=
### Host name ### Hostname
PORTAINER_HOST=portainer_app_1 PORTAINER_HOST=portainer_app_1
## Gitea
### Domain name
GITEA_DOMAIN=
### Hostname
GITEA_HOST=gitea_app_1

View File

@ -0,0 +1,23 @@
server {
# SSL Key locations
ssl_certificate /etc/letsencrypt/live/${GITEA_DOMAIN}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${GITEA_DOMAIN}/privkey.pem;
listen ${HTTPS_PORT} ssl;
listen [::]:${HTTPS_PORT} ssl;
server_name ${GITEA_DOMAIN};
location / {
resolver 127.0.0.11;
proxy_pass http://#{GITEA_HOST}:3000/;
# Static content caching
location ~* \.(?:jpg|jpeg|png|gif|ico|css|js|ttf)$ {
expires 1h;
add_header Cache-Control public;
proxy_pass http://${GITEA_HOST}:3000;
}
}
}