Commit initial files from server to repo

This commit is contained in:
Christoph Lampe
2023-01-18 14:50:15 +01:00
parent ac41be8292
commit e276d57f06
4 changed files with 73 additions and 0 deletions

8
.env Normal file
View File

@@ -0,0 +1,8 @@
# Set UID and GID From Git system user account here
GITEA_UID=113
GITEA_GID=122
# DB
POSTGRES_PASSWORD=ChangeMe!
POSTGRES_DB=gitea
POSTGRES_USER=gitea

52
docker-compose.yml Normal file
View File

@@ -0,0 +1,52 @@
version: "3"
services:
db:
image: postgres:14-alpine
restart: always
#environment:
#- POSTGRES_USER=${POSTGRES_USER}
#- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
#- POSTGRES_DB=${POSTGRES_DB}
networks:
- default
volumes:
- ./data/pgsql:/var/lib/postgresql/data
gitea:
image: gitea/gitea:latest
# container_name: gitea
environment:
- USER_UID=${GITEA_UID}
- USER_GID=${GITEA_GID}
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=db:5432
- GITEA__database__NAME=${POSTGRES_DB}
- GITEA__database__USER=${POSTGRES_USER}
- GITEA__database__PASSWD=${POSTGRES_PASSWORD}
restart: always
networks:
- default
- proxy
volumes:
- ./data/gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
# ports:
# - "3000:3000"
# - "2221:22"
depends_on:
- db
labels:
- traefik.enable=true
- traefik.http.routers.gitea.rule=Host(`gitea.example.com`)
- traefik.http.routers.gitea.tls.certResolver=le
- traefik.http.routers.gitea.service=gitea
- traefik.http.services.gitea.loadbalancer.server.port=3000
- traefik.docker.network=proxy
networks:
proxy:
external: true

11
script-dir_structure.sh Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
# set -x
DIR=./data
if [ -d "$DIR" ];
then
echo "WARNING: $DIR directory already exists. For a new empty structure delete or move it! Aborting..."
else
mkdir -p data/{pgsql,gitea}
fi

2
script-user_git.sh Normal file
View File

@@ -0,0 +1,2 @@
adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git