added deploy compose to repo to avoid volume mounts from workers
Some checks failed
Build and Deploy Backend / Run Linters and Tests (push) Successful in 44s
Build and Deploy Backend / Build and Deploy (push) Failing after 2m10s

This commit is contained in:
c-d-p
2025-04-30 22:56:51 +02:00
parent d05248a89e
commit 65ac965977
2 changed files with 89 additions and 20 deletions

View File

@@ -0,0 +1,63 @@
services:
server:
image: docker.gitea.com/gitea:latest
container_name: gitea
environment:
- USER_UID=1020
- USER_GID=1020
- GITEA__service__DISABLE_REGISTRATION=true
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=db:5432
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=cams_very_special_GITEA_pwd_2o25
restart: unless-stopped
networks:
- default
volumes:
- /home/git/gitea:/data
- /home/git/.ssh/:/data/git/.ssh
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "2222:22"
expose:
- "3000"
labels:
- "traefik.enable=true"
- "traefik.http.routers.gitea.rule=Host(`git.depaoli.id.au`)"
- "traefik.http.routers.gitea.tls=true"
- "traefik.http.routers.gitea.entrypoints=secureweb"
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
- "traefik.http.routers.gitea.tls.certresolver=myresolver"
- "traefik.docker.network=host"
depends_on:
- "db"
runner:
image: docker.io/gitea/act_runner:latest
container_name: gitea_runner
restart: unless-stopped
depends_on:
- server
networks:
- default
environment:
GITEA_RUNNER_LABELS: "ubuntu-latest:docker://gitea-runner-base:ubuntu-node16"
GITEA_INSTANCE_URL: "https://git.depaoli.id.au"
GITEA_RUNNER_REGISTRATION_TOKEN: "JRrwF2HYSFKzFRVodBjiX4jIaMgZqrsaPgP9g6eh"
GITEA_RUNNER_NAME: "gitea_runner"
volumes:
# needs docker sock to spin up children runners
- /var/run/docker.sock:/var/run/docker.sock
- /srv/docker/container/gitea/runner:/data
db:
image: docker.io/library/postgres:14
restart: unless-stopped
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=cams_very_special_GITEA_pwd_2o25
- POSTGRES_DB=gitea
networks:
- default
volumes:
- /srv/docker/container/gitea/db:/var/lib/postgresql/data