Gitea Actions CI: tests, image build to registry.sagifer.com, SSH deploy
- .gitea/workflows/ci.yml: test (Postgres service), build and push the four images tagged with the commit hash, deploy over SSH when DEPLOY_HOST is set - ci/runner: act_runner 0.6.1 on the dev server using the host's Docker - deploy/: production compose with Caddy (https), daily pg_dump backups, log rotation; setup guide Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# act_runner configuration (see `act_runner generate-config` for every option).
|
||||
log:
|
||||
level: info
|
||||
|
||||
runner:
|
||||
file: .runner
|
||||
capacity: 1
|
||||
timeout: 1h
|
||||
# Jobs without their own `container:` run in the Docker CLI image.
|
||||
labels:
|
||||
- "linux:docker://docker:29.9.3-cli"
|
||||
|
||||
cache:
|
||||
# Not used: the cargo and BuildKit caches live in Docker volumes.
|
||||
enabled: false
|
||||
|
||||
container:
|
||||
network: ""
|
||||
privileged: false
|
||||
# The host's Docker socket is mounted into every job container (docker_host
|
||||
# empty), so `docker build` uses the host daemon and its build cache.
|
||||
docker_host: ""
|
||||
# Only the CI cache volumes may be mounted by workflows.
|
||||
valid_volumes:
|
||||
- "sorsfonalak-ci-*"
|
||||
force_pull: false
|
||||
@@ -0,0 +1,24 @@
|
||||
# Gitea Actions runner for this repository, on the dev server.
|
||||
#
|
||||
# First start (registers the runner; the token is only needed once):
|
||||
# GITEA_RUNNER_REGISTRATION_TOKEN=... docker compose up -d
|
||||
# Afterwards: docker compose up -d
|
||||
|
||||
services:
|
||||
runner:
|
||||
image: gitea/act_runner:0.6.1
|
||||
environment:
|
||||
CONFIG_FILE: /config.yaml
|
||||
GITEA_INSTANCE_URL: ${GITEA_INSTANCE_URL:-http://10.0.0.114:30008}
|
||||
GITEA_RUNNER_REGISTRATION_TOKEN: ${GITEA_RUNNER_REGISTRATION_TOKEN:-}
|
||||
GITEA_RUNNER_NAME: ${GITEA_RUNNER_NAME:-dev-195}
|
||||
volumes:
|
||||
- ./config.yaml:/config.yaml:ro
|
||||
# Registration (.runner) lives here.
|
||||
- runner-data:/data
|
||||
# Job containers are started on the host daemon.
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
runner-data:
|
||||
Reference in New Issue
Block a user