mirror of
https://github.com/acedanger/docker.git
synced 2025-12-06 07:50:11 -08:00
Add Gitea setup documentation, environment configuration, and Docker Compose files
This commit is contained in:
48
git/prev/compose.yml
Normal file
48
git/prev/compose.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
services:
|
||||
server:
|
||||
image: gitea/gitea:latest
|
||||
container_name: gitea-server
|
||||
environment:
|
||||
- USER_UID=121 # (europa) id -u git
|
||||
- USER_GID=65534 # (europa) id -g git
|
||||
- GITEA__database__DB_TYPE=postgres
|
||||
- GITEA__database__HOST=${POSTGRES_HOST:-db}:${POSTGRES_PORT:-5432}
|
||||
- GITEA__database__NAME=${POSTGRES_DB:?POSTGRES_DB not set}
|
||||
- GITEA__database__USER=${POSTGRES_USER:?POSTGRES_USER not set}
|
||||
- GITEA__database__PASSWD=${POSTGRES_PASSWORD:?POSTGRES_PASSWORD not set}
|
||||
- GITEA__server__SSH_PORT=${SSH_PORT}
|
||||
- GITEA__server__ROOT_URL=https://git.ptrwd.com
|
||||
networks:
|
||||
- backend
|
||||
volumes:
|
||||
- gitea-data:/data
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /home/git/.ssh/:/data/git/.ssh
|
||||
ports:
|
||||
- ${WEB_PORT}:3000
|
||||
- ${SSH_PORT}:22
|
||||
depends_on:
|
||||
- db
|
||||
restart: unless-stopped
|
||||
db:
|
||||
image: postgres:14
|
||||
container_name: gitea-db
|
||||
environment:
|
||||
- POSTGRES_USER=${POSTGRES_USER:?POSTGRES_USER not set}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?POSTGRES_PASSWORD not set}
|
||||
- POSTGRES_DB=${POSTGRES_DB:?POSTGRES_DB not set}
|
||||
networks:
|
||||
- backend
|
||||
volumes:
|
||||
- gitea-db:/var/lib/postgresql/data
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
backend:
|
||||
external: true
|
||||
volumes:
|
||||
gitea-data:
|
||||
driver: local
|
||||
gitea-db:
|
||||
driver: local
|
||||
Reference in New Issue
Block a user