setup deploy on swarm
deploy / deploy (push) Failing after 1s

This commit is contained in:
2026-08-28 20:58:08 +02:00
parent 27caf54382
commit 8bc3dbe58b
2 changed files with 48 additions and 1 deletions
+38
View File
@@ -0,0 +1,38 @@
# https://docs.github.com/en/actions/reference/workflows-and-actions/variables
---
name: deploy
on:
push:
paths:
- '*.yml'
- '*.yaml'
env:
GIT_ASKPASS: ${{ vars.RUNNER_SCRIPT_DIR }}/askpass_helper.sh
GIT_TOKEN: ${{ secrets.TOKEN_SVC_CI }}
GIT_REPO: ${{ gitea.repository }}
DOCKER_STACK_NAME: aoc
jobs:
deploy:
runs-on: swarm-test
steps:
- name: get repo
working-directory: /swarm
if: ${{ contains( gitea.event.head_commit.message , '!clone' ) }}
run: |
git clone $GITHUB_SERVER_URL/$GIT_REPO $DOCKER_STACK_NAME
cd
git submodule update --init
- name: update repo
working-directory: /swarm/${{ env.DOCKER_STACK_NAME }}
run: git pull
- name: stop stack
run: docker stack rm $DOCKER_STACK_NAME
- name: start stack
working-directory: /swarm/${{ env.DOCKER_STACK_NAME }}
run: docker stack deploy -c docker-compose.yml $DOCKER_STACK_NAME
if: ${{ !contains( gitea.event.head_commit.message , '!clone' ) }}
+10 -1
View File
@@ -1,7 +1,16 @@
services:
aoc:
image: git.ao-it.net/aoit/aoc:latest
image: git.ao-it.net/ao-it/aoc:latest
restart: always
deploy:
replicas: 1
placement:
max_replicas_per_node: 1
constraints:
- node.role != manager
update_config:
parallelism: 1
delay: 10s
volumes:
- ./files/aoc.conf:/data/aoc.conf
- ./files/aoc.db:/data/aoc.db