fix: Moves back to old setup, watchtower setup wasn't working as expected.
This commit is contained in:
@@ -1,55 +1,55 @@
|
|||||||
name: CI
|
# name: CI
|
||||||
|
#
|
||||||
on:
|
# on:
|
||||||
push:
|
# push:
|
||||||
branches:
|
# branches:
|
||||||
- main
|
# - main
|
||||||
pull_request: {}
|
# pull_request: {}
|
||||||
workflow_dispatch: {}
|
# workflow_dispatch: {}
|
||||||
|
#
|
||||||
jobs:
|
# jobs:
|
||||||
release:
|
# release:
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
steps:
|
# steps:
|
||||||
- name: Checkout
|
# - name: Checkout
|
||||||
uses: actions/checkout@v4
|
# uses: actions/checkout@v4
|
||||||
with:
|
# with:
|
||||||
lfs: true
|
# lfs: true
|
||||||
|
#
|
||||||
- name: Setup QEMU
|
# - name: Setup QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
# uses: docker/setup-qemu-action@v3
|
||||||
|
#
|
||||||
- name: Setup docker buildx
|
# - name: Setup docker buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
# uses: docker/setup-buildx-action@v3
|
||||||
|
#
|
||||||
- name: Login to Container Registery
|
# - name: Login to Container Registery
|
||||||
uses: docker/login-action@v3
|
# uses: docker/login-action@v3
|
||||||
with:
|
# with:
|
||||||
registry: git.housh.dev
|
# registry: git.housh.dev
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
#
|
||||||
- name: Extract metadata for Docker
|
# - name: Extract metadata for Docker
|
||||||
id: meta
|
# id: meta
|
||||||
uses: docker/metadata-action@v5
|
# uses: docker/metadata-action@v5
|
||||||
with:
|
# with:
|
||||||
images: git.housh.dev/homelab/caddy
|
# images: git.housh.dev/homelab/caddy
|
||||||
tags: |
|
# tags: |
|
||||||
type=schedule
|
# type=schedule
|
||||||
type=ref,event=branch
|
# type=ref,event=branch
|
||||||
type=ref,event=pr
|
# type=ref,event=pr
|
||||||
type=semver,pattern={{version}}
|
# type=semver,pattern={{version}}
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
# type=semver,pattern={{major}}.{{minor}}
|
||||||
type=semver,pattern={{major}}
|
# type=semver,pattern={{major}}
|
||||||
type=sha
|
# type=sha
|
||||||
type=raw,value=latest
|
# type=raw,value=latest
|
||||||
|
#
|
||||||
- name: Build and push Docker image
|
# - name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v6
|
# uses: docker/build-push-action@v6
|
||||||
with:
|
# with:
|
||||||
context: .
|
# context: .
|
||||||
file: ./Dockerfile
|
# file: ./Dockerfile
|
||||||
platforms: linux/arm64
|
# platforms: linux/arm64
|
||||||
push: true
|
# push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
# tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
# labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|||||||
25
compose.yaml
25
compose.yaml
@@ -1,6 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
caddy:
|
caddy:
|
||||||
image: 127.0.0.1:3000/homelab/caddy:latest
|
build:
|
||||||
|
context: .
|
||||||
container_name: caddy
|
container_name: caddy
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
env_file:
|
||||||
@@ -16,31 +17,13 @@ services:
|
|||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
volumes:
|
volumes:
|
||||||
|
- ./config:/etc/caddy
|
||||||
- caddy_data:/data
|
- caddy_data:/data
|
||||||
- caddy_config:/config
|
- caddy_config:/config
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
security_opt:
|
security_opt:
|
||||||
- no-new-privileges:true
|
- no-new-privileges:true
|
||||||
labels:
|
|
||||||
com.centurylinklabs.watchtower.enable: true
|
|
||||||
|
|
||||||
# This is primarily for pulling and restarting the primary caddy service
|
|
||||||
# because restarting caddy through webhooks spawned by komodo do not really
|
|
||||||
# work, because caddy is the gateway of communication with komodo, therefore
|
|
||||||
# when I tried webhooks it would pull the new data / configuration, stop the caddy service,
|
|
||||||
# and I would have to ssh into the server to restart caddy for changes to take effect.
|
|
||||||
watchtower:
|
|
||||||
image: containrrr/watchtower
|
|
||||||
container_name: watchtower
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
networks:
|
|
||||||
- backend
|
|
||||||
environment:
|
|
||||||
WATCTOWER_LABEL_ENABLE: true
|
|
||||||
WATCHTOWER_POLL_INTERVAL: 300 # 5 minutes
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
caddy_data: {}
|
caddy_data: {}
|
||||||
@@ -49,5 +32,3 @@ volumes:
|
|||||||
networks:
|
networks:
|
||||||
proxy:
|
proxy:
|
||||||
external: true
|
external: true
|
||||||
backend:
|
|
||||||
external: true
|
|
||||||
|
|||||||
Reference in New Issue
Block a user