Merge branch 'gitea-rework' of gitlab.com:rusty-bever/deployment into gitea-rework

gitea-rework
Jef Roosens 2021-12-25 12:00:31 +01:00
commit 588b0e87dc
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
1 changed files with 64 additions and 59 deletions

View File

@ -1,74 +1,79 @@
version: '3' version: '3'
services: services:
app: app:
# Latest contains a development version # Latest contains a development version
image: 'gitea/gitea:1.15.8' image: 'gitea/gitea:1.15.8'
deploy: deploy:
mode: 'replicated' mode: 'replicated'
replicas: 1 replicas: 1
placement: placement:
constraints: constraints:
- 'node.labels.class==gitea' - 'node.labels.class==gitea'
labels: labels:
- 'traefik.enable=true' - 'traefik.enable=true'
- 'traefik.http.routers.gitea.rule=Host(`git.rustybever.be`)' - 'traefik.http.routers.gitea.rule=Host(`git.rustybever.be`)'
- 'traefik.http.routers.gitea.tls=true' - 'traefik.http.routers.gitea.tls=true'
- 'traefik.http.routers.gitea.tls.certresolver=letsEncrypt' - 'traefik.http.routers.gitea.tls.certresolver=letsEncrypt'
- 'traefik.http.services.gitea.loadbalancer.server.port=3000' - 'traefik.http.services.gitea.loadbalancer.server.port=3000'
configs: configs:
- source: gitea_v1 - source: gitea_v1
target: /data/gitea/conf/app.ini target: /data/gitea/conf/app.ini
environment: environment:
- 'DB_TYPE=postgres' - 'DB_TYPE=postgres'
- 'DB_HOST=db:5432' - 'DB_HOST=db:5432'
- 'DB_NAME=gitea' - 'DB_NAME=gitea'
- 'DB_USER=gitea' - 'DB_USER=gitea'
- 'DB_PASSWD=gitea' - 'DB_PASSWD=gitea'
- 'LFS_START_SERVER=true' - 'LFS_START_SERVER=true'
- 'DISABLE_REGISTRATION=true' - 'DISABLE_REGISTRATION=true'
- 'GITEA__server__LFS_JWT_SECRET_FILE=/run/secrets/gitea_lfs_jwt_secret' - 'GITEA__server__LFS_JWT_SECRET_FILE=/run/secrets/gitea_lfs_jwt_secret'
- 'GITEA__security__SECRET_KEY_FILE=/run/secrets/gitea_secret_key' - 'GITEA__security__SECRET_KEY_FILE=/run/secrets/gitea_secret_key'
- 'GITEA__security__INTERNAL_TOKEN_FILE=/run/secrets/gitea_internal_token' - 'GITEA__security__INTERNAL_TOKEN_FILE=/run/secrets/gitea_internal_token'
- 'GITEA__oauth2__JWT_SECRET_FILE=/run/secrets/gitea_jwt_secret' - 'GITEA__oauth2__JWT_SECRET_FILE=/run/secrets/gitea_jwt_secret'
networks: networks:
- 'default' - 'default'
- 'public' - 'public'
ports: ports:
- '22:22' - '22:22'
volumes: volumes:
- 'data:/data' - 'data:/data'
- 'repos:/data/git/repositories' - 'repos:/data/git/repositories'
- 'lfs:/data/git/lfs' - 'lfs:/data/git/lfs'
- '/etc/timezone:/etc/timezone:ro' - '/etc/timezone:/etc/timezone:ro'
- '/etc/localtime:/etc/localtime:ro' - '/etc/localtime:/etc/localtime:ro'
secrets:
- gitea_internal_token
- gitea_jwt_secret
- gitea_lfs_jwt_secret
- gitea_secret_key
db: db:
image: 'postgres:14.1-alpine' image: 'postgres:14.1-alpine'
deploy: deploy:
mode: 'replicated' mode: 'replicated'
replicas: 1 replicas: 1
placement: placement:
constraints: constraints:
- 'node.labels.class==gitea' - 'node.labels.class==gitea'
environment: environment:
- 'POSTGRES_USER=gitea' - 'POSTGRES_USER=gitea'
- 'POSTGRES_PASSWORD=gitea' - 'POSTGRES_PASSWORD=gitea'
- 'POSTGRES_DB=gitea' - 'POSTGRES_DB=gitea'
volumes: volumes:
- 'db-data:/var/lib/postgresql/data' - 'db-data:/var/lib/postgresql/data'
configs: configs:
gitea_v1: gitea_v1:
external: true external: true
networks: networks:
public: public:
external: true external: true
secrets: secrets:
gitea_internal_token: gitea_internal_token: