deployment/stacks/gitea.yml

67 lines
1.7 KiB
YAML
Raw Normal View History

2021-12-18 10:35:43 +01:00
version: '3'
services:
app:
# Latest contains a development version
2021-12-22 15:13:19 +01:00
image: 'gitea/gitea:1.15.8'
2021-12-18 10:35:43 +01:00
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class==gitea'
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.gitea.rule=Host(`git.rustybever.be`)'
- 'traefik.http.routers.gitea.tls=true'
- 'traefik.http.routers.gitea.tls.certresolver=letsEncrypt'
- 'traefik.http.services.gitea.loadbalancer.server.port=3000'
environment:
- 'DB_TYPE=postgres'
- 'DB_HOST=db:5432'
- 'DB_NAME=gitea'
- 'DB_USER=gitea'
- 'DB_PASSWD=gitea'
- 'LFS_START_SERVER=true'
- 'DISABLE_REGISTRATION=true'
networks:
- 'default'
- 'public'
ports:
- '22:22'
volumes:
- 'data:/data'
- 'repos:/data/git/repositories'
- 'lfs:/data/git/lfs'
- '/etc/timezone:/etc/timezone:ro'
- '/etc/localtime:/etc/localtime:ro'
db:
image: 'postgres:14.1-alpine'
deploy:
mode: 'replicated'
replicas: 1
placement:
constraints:
- 'node.labels.class==gitea'
environment:
- 'POSTGRES_USER=gitea'
- 'POSTGRES_PASSWORD=gitea'
- 'POSTGRES_DB=gitea'
volumes:
- 'db-data:/var/lib/postgresql/data'
networks:
public:
external: true
volumes:
data:
db-data:
repos:
lfs: