Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: "3.8"
- networks:
- infra:
- driver: "bridge"
- external: "false"
- secrets:
- postgres_db_password:
- file: .secrets/gitea/psql_password.txt
- services:
- gitea:
- image: gitea/gitea:latest
- container_name: gitea
- environment:
- - USER_UID=1000
- - USER_GID=1000
- - GITEA__database__DB_TYPE=postgres
- - GITEA__database__HOST=postgres:5432
- - GITEA__database__NAME=gitea
- - GITEA__database__USER=gitea
- - GITEA__database__PASSWD_FILE=/run/secrets/postgres_db_password
- restart: always
- depends_on:
- - postgres
- networks:
- - infra
- volumes:
- - ./data/gitea:/data
- - /etc/timezone:/etc/timezone:ro
- - /etc/localtime:/etc/localtime:ro
- ports:
- - "3000:3000"
- - "222:22" # SSH port changed to prevent conflicts
- secrets:
- - postgres_db_password
- postgres:
- image: postgres:latest
- container_name: postgres-gitea
- networks:
- - infra
- volumes:
- - ./data/postgres:/var/lib/postgresql/data
- environment:
- - POSTGRES_USER=gitea
- - POSTGRES_DB=gitea
- - POSTGRES_PASSWORD_FILE=/run/secrets/postgres_db_password
- secrets:
- - postgres_db_password
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement