sysfiles/opt/gitea/docker-compose.yml

61 lines
1.5 KiB
YAML

version: "3.0"
networks:
gitea:
external: false
services:
server:
container_name: gitea
image: gitea/gitea:1.17.3
restart: always
environment:
USER_UID: 1000
USER_GID: 1000
GITEA__database__DB_TYPE: postgres
GITEA__database__HOST: db:5432
GITEA__database__NAME: ${POSTGRES_DB}
GITEA__database__USER: ${POSTGRES_USER}
GITEA__database__PASSWD: ${POSTGRES_PASSWORD}
GITEA__server__DOMAIN: git.jilits.se
GITEA__server__SSH_PORT: 2222
GITEA__server__LANDING_PAGE: /explore/repos
GITEA__server__OFFLINE_MODE: "true"
GITEA__openid__ENABLE_OPENID_SIGNIN: "false"
GITEA__service__DISABLE_REGISTRATION: "true"
GITEA__service__NO_REPLY_ADDRESS: noreply.git.jilits.se
GITEA__mailer__ENABLED: "true"
GITEA__mailer__MAILER_TYPE: smtp
GITEA__mailer__HOST: mail.jilits.se:587
GITEA__mailer__FROM: Gitea <git@jilits.se>
GITEA__mailer__USER: ${SMTP_USER}
GITEA__mailer__PASSWD: ${SMTP_PASS}
GITEA__time__FORMAT: "2006-01-02 15:04:05"
networks:
- gitea
volumes:
- gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "8002:3000"
- "2222:22"
depends_on:
- db
db:
image: postgres:15.0-alpine3.16
restart: always
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
networks:
- gitea
volumes:
- db:/var/lib/postgresql/data
volumes:
gitea:
db: