feat(Gitea): Split Postgres configuration

This commit is contained in:
Simon 2023-09-28 11:58:49 +02:00
parent 0a99b3402c
commit 9078d9d04f
6 changed files with 24 additions and 8 deletions

View File

@ -1,3 +1,5 @@
---
version: "3.8" version: "3.8"
services: services:

View File

@ -1,3 +1,5 @@
---
version: "3.8" version: "3.8"
services: services:

View File

@ -0,0 +1,14 @@
---
version: "3.8"
services:
gitea:
environment:
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=${POSTGRES_CONTAINER_NAME:-postgres}:5432
- GITEA__database__NAME=${POSTGRES_DB}
- GITEA__database__USER=${POSTGRES_USER}
- GITEA__database__PASSWD=${POSTGRES_PASSWORD}
depends_on:
- postgres

View File

@ -1,3 +1,5 @@
---
version: "3.8" version: "3.8"
services: services:

View File

@ -1,3 +1,5 @@
---
version: "3.8" version: "3.8"
networks: networks:

View File

@ -1,3 +1,5 @@
---
version: "3.8" version: "3.8"
volumes: volumes:
@ -12,12 +14,6 @@ services:
environment: environment:
- USER_UID=${GITEA_UID:-1000} - USER_UID=${GITEA_UID:-1000}
- USER_GID=${GITEA_GID:-1000} - USER_GID=${GITEA_GID:-1000}
# Database
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=${POSTGRES_CONTAINER_NAME:-postgres}:5432
- GITEA__database__NAME=${POSTGRES_DB}
- GITEA__database__USER=${POSTGRES_USER}
- GITEA__database__PASSWD=${POSTGRES_PASSWORD}
# Security # Security
# docker run -it --rm gitea/gitea:1 gitea generate secret SECRET_KEY # docker run -it --rm gitea/gitea:1 gitea generate secret SECRET_KEY
- GITEA__security__SECRET_KEY=${GITEA_SECRET_KEY} - GITEA__security__SECRET_KEY=${GITEA_SECRET_KEY}
@ -27,5 +23,3 @@ services:
- gitea:/data - gitea:/data
- /etc/timezone:/etc/timezone:ro - /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
depends_on:
- postgres