This commit is contained in:
1
.env.example
Normal file
1
.env.example
Normal file
@@ -0,0 +1 @@
|
||||
RUNNER_TOKEN=your_token_here
|
||||
17
.gitea/workflows/deploy.yml
Normal file
17
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
name: deploy core services
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: z420
|
||||
steps:
|
||||
- name: deploy
|
||||
run: |
|
||||
cd /home/sirian/services/core
|
||||
git pull origin main
|
||||
docker compose pull
|
||||
docker compose up -d --remove-orphans
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.env
|
||||
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM gitea/act_runner:latest
|
||||
|
||||
USER root
|
||||
|
||||
RUN apk add --no-cache openssh-client git docker-cli docker-cli-compose
|
||||
|
||||
RUN adduser -D -u 1000 -g 1000 sirian
|
||||
|
||||
USER 1000
|
||||
16
README.md
Normal file
16
README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Z420 core stack
|
||||
|
||||
Core infrastructure for z420 home server
|
||||
|
||||
## services
|
||||
|
||||
- Gitea runner
|
||||
|
||||
## setup
|
||||
|
||||
1. Make .env file and fill with gitea runner token
|
||||
2. Deploy with 'docker compose up -d'
|
||||
|
||||
## data
|
||||
|
||||
All data is stored in /var/lib/z420
|
||||
18
docker-compose.yml
Normal file
18
docker-compose.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
services:
|
||||
gitea-runner:
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
user: "1000:1000"
|
||||
group_add:
|
||||
- "996"
|
||||
environment:
|
||||
- GITEA_INSTANCE_URL=https://git.sirian.me
|
||||
- GITEA_RUNNER_REGISTRATION_TOKEN=${RUNNER_TOKEN}
|
||||
- GITEA_RUNNER_LABELS=z420
|
||||
- GITEA_RUNNER_NAME=z420-runner
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /var/lib/z420/gitea_runner:/data
|
||||
- /var/lib/z420/gitea_runner/cache:/.cache
|
||||
- /home/sirian/services:/home/sirian/services
|
||||
- /home/sirian/.ssh:/home/sirian/.ssh:ro
|
||||
Reference in New Issue
Block a user