Match compose layout to production dind + runner deployment
This commit is contained in:
1 parent
6d04a924e3
commit
6f2c451187
17 files changed
+303
-785
No files matched your search
+45
-54
@@ -1,64 +1,55 @@
|
||||
name: gitea-gvisor
|
||||
networks:
|
||||
caddy:
|
||||
external: true
|
||||
gitea:
|
||||
driver: bridge
|
||||
ci:
|
||||
driver: bridge
|
||||
|
||||
services:
|
||||
gitea:
|
||||
image: gitea/gitea:1.27.3
|
||||
# The target Docker host may default to runsc. Gitea and the runner's
|
||||
# privileged dockerd must stay on runc; only nested job sandboxes use runsc.
|
||||
runtime: runc
|
||||
server:
|
||||
image: docker.gitea.com/gitea
|
||||
container_name: gitea
|
||||
#environment:
|
||||
# - USER_UID=1000
|
||||
# - USER_GID=1000
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
USER_UID: "1000"
|
||||
USER_GID: "1000"
|
||||
GITEA__database__DB_TYPE: sqlite3
|
||||
GITEA__security__INSTALL_LOCK: "true"
|
||||
GITEA__actions__ENABLED: "true"
|
||||
GITEA__server__DOMAIN: ${GITEA_DOMAIN:-gitea}
|
||||
GITEA__server__SSH_DOMAIN: ${GITEA_DOMAIN:-gitea}
|
||||
# Reachable from job containers, which share the runner's network
|
||||
# namespace. Override with the public URL if the web UI must use it.
|
||||
GITEA__server__ROOT_URL: ${GITEA_ROOT_URL:-http://gitea:3000/}
|
||||
GITEA__server__HTTP_PORT: "3000"
|
||||
networks:
|
||||
- caddy
|
||||
- gitea
|
||||
volumes:
|
||||
- gitea-data:/data
|
||||
- ./gitea:/data
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
ports:
|
||||
- "${GITEA_HTTP_PORT:-3000}:3000"
|
||||
- "${GITEA_SSH_PORT:-2222}:22"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -fsS http://localhost:3000/api/healthz || exit 1"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 60
|
||||
start_period: 20s
|
||||
# - "3000:3000"
|
||||
- "222:22"
|
||||
|
||||
dind:
|
||||
build:
|
||||
context: ./gvisor/images/basic/docker
|
||||
runtime: runsc-docker
|
||||
environment:
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
DOCKER_TMPFS_SIZE: 5G
|
||||
cap_add:
|
||||
- ALL
|
||||
volumes:
|
||||
- ./dind-data:/var/lib/docker
|
||||
- ./dind-runsc/resolv.conf:/etc/resolv.conf:ro
|
||||
#command: --no-overlay
|
||||
# No published TCP Docker API port.
|
||||
networks:
|
||||
- ci
|
||||
|
||||
runner:
|
||||
build:
|
||||
context: ./runner
|
||||
image: gitea-gvisor-runner:latest
|
||||
runtime: runc
|
||||
image: docker.gitea.com/act_runner:latest
|
||||
restart: unless-stopped
|
||||
# dockerd needs privileged mode to create the nested job containers. The job
|
||||
# containers themselves always run under runsc/gVisor.
|
||||
privileged: true
|
||||
networks:
|
||||
- gitea
|
||||
- ci
|
||||
environment:
|
||||
GITEA_INSTANCE_URL: http://gitea:3000
|
||||
GITEA_RUNNER_NAME: ${GITEA_RUNNER_NAME:-gvisor-runner}
|
||||
# Either set a token explicitly, or set GITEA_ADMIN_USER/PASSWORD and let
|
||||
# the runner fetch one from the Gitea API.
|
||||
GITEA_RUNNER_REGISTRATION_TOKEN: ${GITEA_RUNNER_REGISTRATION_TOKEN:-}
|
||||
GITEA_ADMIN_USER: ${GITEA_ADMIN_USER:-}
|
||||
GITEA_ADMIN_PASSWORD: ${GITEA_ADMIN_PASSWORD:-}
|
||||
DOCKER_HOST: unix:///var/run/docker.sock
|
||||
CONFIG_FILE: /data/config.yaml
|
||||
GITEA_INSTANCE_URL: https://gitea.ct.cozytren.ch
|
||||
volumes:
|
||||
- runner-data:/data
|
||||
# Real disk-backed Docker storage: no memory-limited tmpfs, so arbitrary
|
||||
# image and build sizes are possible.
|
||||
- runner-docker:/var/lib/docker
|
||||
depends_on:
|
||||
gitea:
|
||||
condition: service_healthy
|
||||
|
||||
volumes:
|
||||
gitea-data:
|
||||
runner-data:
|
||||
runner-docker:
|
||||
- ./runner:/data
|
||||
Reference in new issue
Block a user