feat: add gitea docker configuration
This commit is contained in:
commit
362917f7ee
2 changed files with 56 additions and 0 deletions
3
.env.example
Normal file
3
.env.example
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
GITEA_DB_USER=gitea_user
|
||||
GITEA_DB_PASSWORD=your_secure_password_here
|
||||
|
||||
53
docker-compose.yml
Normal file
53
docker-compose.yml
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
gitea:
|
||||
image: gitea/gitea:latest
|
||||
container_name: gitea
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
- GITEA__database__DB_TYPE=postgres
|
||||
- GITEA__database__HOST=db:5432
|
||||
- GITEA__database__NAME=gitea
|
||||
- GITEA__database__USER_secure=${GITEA_DB_USER}
|
||||
- GITEA__database__PASSWD_secure=${GITEA_DB_PASSWORD}
|
||||
- GITEA__server__DOMAIN=gitea.sigd.net
|
||||
- GITEA__server__ROOT_URL=https://gitea.sigd.net/
|
||||
- GITEA__security__INSTALL_LOCK=true
|
||||
volumes:
|
||||
- /docker/gitea/data:/data
|
||||
- /docker/gitea/config:/etc/gitea
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
restart: always
|
||||
networks:
|
||||
- gitea_network
|
||||
|
||||
db:
|
||||
image: postgres:15-alpine
|
||||
container_name: gitea-db
|
||||
environment:
|
||||
- POSTGRES_USER=${GITEA_DB_USER}
|
||||
- POSTGRES_PASSWORD=${GITEA_DB_PASSWORD}
|
||||
- POSTGRES_DB=gitea
|
||||
volumes:
|
||||
- /docker/gitea/postgres:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${GITEA_DB_USER}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: always
|
||||
networks:
|
||||
- gitea_network
|
||||
|
||||
networks:
|
||||
gitea_network:
|
||||
driver: bridge
|
||||
|
||||
Loading…
Add table
Reference in a new issue