feat(deploy): vollständige Containerlösung
This commit is contained in:
5
deploy/dockerfile
Normal file
5
deploy/dockerfile
Normal file
@@ -0,0 +1,5 @@
|
||||
FROM alpine:3.19
|
||||
|
||||
RUN apk add --no-cache git docker-cli bash
|
||||
|
||||
WORKDIR /workspace
|
||||
@@ -1,31 +1,25 @@
|
||||
[
|
||||
{
|
||||
"id": "bruchtal-deploy",
|
||||
"execute-command": "/docker/Bruchtal/deploy/deploy-bruchtal.sh",
|
||||
"command-working-directory": "/docker/Bruchtal",
|
||||
"trigger-rule": {
|
||||
"and": [
|
||||
"execute-command": "docker",
|
||||
"command-working-directory": "/",
|
||||
"pass-arguments-to-command": [
|
||||
{
|
||||
"match": {
|
||||
"type": "payload-hmac-sha256",
|
||||
"secret": "!!Zazen17**",
|
||||
"parameter": {
|
||||
"source": "header",
|
||||
"name": "X-Gitea-Signature"
|
||||
}
|
||||
}
|
||||
"source": "string",
|
||||
"name": "exec"
|
||||
},
|
||||
{
|
||||
"match": {
|
||||
"type": "value",
|
||||
"parameter": {
|
||||
"source": "payload",
|
||||
"name": "ref"
|
||||
"source": "string",
|
||||
"name": "bruchtal-deploy"
|
||||
},
|
||||
"value": "refs/heads/main"
|
||||
}
|
||||
{
|
||||
"source": "string",
|
||||
"name": "bash"
|
||||
},
|
||||
{
|
||||
"source": "string",
|
||||
"name": "/workspace/deploy/deploy-bruchtal.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -12,6 +12,17 @@ services:
|
||||
- /docker/Bruchtal:/docker/Bruchtal:rw
|
||||
command: ["-hooks", "/hooks/hooks.json", "-verbose", "-port", "9001", "-ip", "0.0.0.0"]
|
||||
|
||||
|
||||
bruchtal-deploy:
|
||||
build: ./deploy
|
||||
container_name: bruchtal-deploy
|
||||
networks:
|
||||
- bruchtal-net
|
||||
volumes:
|
||||
- /docker/Bruchtal:/workspace
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
entrypoint: ["sleep", "infinity"]
|
||||
|
||||
networks:
|
||||
bruchtal-net:
|
||||
external: true
|
||||
Reference in New Issue
Block a user