Use PostgreSQL instead of SQLite

This commit is contained in:
2026-03-09 12:55:42 +08:00
parent 3cbb246b28
commit dd95b3c096
2 changed files with 23 additions and 3 deletions

View File

@@ -9,6 +9,11 @@ services:
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=db:5432
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=gitea
restart: always
networks:
- gitea
@@ -19,3 +24,17 @@ services:
ports:
- "31337:3000"
- "31338:22"
depends_on:
- db
db:
image: postgres:14
restart: always
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=gitea
- POSTGRES_DB=gitea
networks:
- gitea
volumes:
- ./postgres:/var/lib/postgresql/data