33 lines
856 B
YAML
33 lines
856 B
YAML
services:
|
|
gitea:
|
|
image: gitea/gitea:latest
|
|
container_name: gitea
|
|
restart: always
|
|
ports:
|
|
- "127.0.0.1:3000:3000" # HTTP/HTTPS access
|
|
- "33:22" # SSH access (Note: Change 33 if port 22 is open on host)
|
|
volumes:
|
|
- ./gitea:/data
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
environment:
|
|
# Adjust these database connection settings to match the postgres service below
|
|
- DB_TYPE=postgres
|
|
- DB_HOST=db:5432
|
|
- DB_NAME=gitea
|
|
- DB_USER=gitea_user
|
|
- DB_PASSWD=password
|
|
depends_on:
|
|
- db
|
|
|
|
db:
|
|
image: postgres:15-alpine
|
|
container_name: gitea_db
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: gitea_user
|
|
POSTGRES_PASSWORD: password
|
|
POSTGRES_DB: gitea
|
|
volumes:
|
|
- ./postgresql:/var/lib/postgresql/data
|