gitea. draft with embedded PostgreSQL.

This commit is contained in:
Alexey Skobkin 2022-02-28 04:24:04 +03:00
parent 089b641083
commit fe24bfb7bf
3 changed files with 53 additions and 0 deletions

11
gitea/.env.dist Normal file
View file

@ -0,0 +1,11 @@
# see https://docs.gitea.io/en-us/install-with-docker/
USER_UID=1000
USER_GID=1000
HOST_DATA_DIR=./data
HOST_PG_DATA_DIR=./db
EXT_HTTP_PORT=3000
EXT_SSH_PORT=222
LOG_MAX_SIZE=5m
LOG_MAX_FILE=5

2
gitea/data/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/*
!/.gitignore

40
gitea/docker-compose.yml Normal file
View file

@ -0,0 +1,40 @@
version: '3.7'
networks:
gitea:
external: false
services:
server:
image: gitea/gitea:latest
container_name: gitea
depends_on:
- db
restart: unless-stopped
networks:
- gitea
ports:
- "${EXT_HTTP_PORT:-3000}:3000"
- "${EXT_SSH_PORT:-222}:22"
volumes:
- "${HOST_DATA_DIR:-./data}:/data"
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=db:5432
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=gitea
db:
image: postgres:13
restart: unless-stopped
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=gitea
- POSTGRES_DB=gitea
networks:
- gitea
volumes:
- "${HOST_PG_DATA_DIR:-./db}:/var/lib/postgresql/data"