Compare commits
2 Commits
89d25e31b4
...
f65657a781
Author | SHA1 | Date | |
---|---|---|---|
f65657a781 | |||
ec3b3e2db9 |
@ -15,13 +15,6 @@ jobs:
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: dockerx setup
|
||||
uses: docker/setup-buildx-action@v1
|
||||
# - name: Cache Docker layers
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: /tmp/.buildx-cache
|
||||
# key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
# restore-keys: |
|
||||
# ${{ runner.os }}-buildx-
|
||||
- name: login
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
|
@ -173,5 +173,39 @@ With a docker image readily available, we can automatically deploy the blog when
|
||||
|
||||
I personally am a big fan of the simplicity of [portainer](https://www.portainer.io/), as it scales really well when doing perosnal server stuff.
|
||||
|
||||
What we really just need is a simple webhook... Fuck...
|
||||
|
||||
{{< centered image="/screenshot-2024-11-27.png" >}}
|
||||
|
||||
Now, don't get me wrong - portainer is a good piece of software - their business tier is even worth the money.
|
||||
But I am not running a business here. I just want a personal blog. There has to be another way of automatically pulling and redeploying a container based on a new release event.
|
||||
|
||||
IN STEPS [WATCHTOWER](https://containrrr.dev/watchtower/)!
|
||||
This amazing piece of software will monitor and automatically update all containers on a system and update them!
|
||||
Now, this only updates once per 24 hours (by default), but that should be plenty fine.
|
||||
|
||||
```yaml
|
||||
services:
|
||||
watchtower:
|
||||
image: containrrr/watchtower
|
||||
container_name: watchtower
|
||||
environment:
|
||||
- DOCKER_CONFIG=/config
|
||||
volumes:
|
||||
- watchtower-config:/config/
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
volumes:
|
||||
watchtower-config:
|
||||
```
|
||||
|
||||
Only one small thing - if you are hosting the container on a private registry (like I am), you have to do some slight configuration regarding credentials - for this, I will simply refer to the [watchtower documentation](https://containrrr.dev/watchtower/private-registries/).
|
||||
|
||||
# Conclusion
|
||||
PHEW! I started this blog post using words like "simple" and "easy" - but it got a bit out of hand I must admit.
|
||||
The workflow is very simple now though. You don't have to contiously deal with the mess of deploying your stuff, and you dont have to commit unneccesary autogenerated stuff to git.
|
||||
Just focus on writing posts and publish them by merging to `main`. Nice and automated 😁.
|
||||
|
||||
## P.S.
|
||||
You may notice that the build script on the real
|
||||
You may notice that the CI script on the real blog repository is a bit more complicated than what we've went through in this post, but the extra complexity only comes from some stupid technicalities regarding my build server being based on ARM rather than x86 (raspberry pi).
|
||||
The script we made here is plenty good to get you started.
|
||||
|
BIN
static/screenshot-2024-11-27.png
Normal file
BIN
static/screenshot-2024-11-27.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
Loading…
x
Reference in New Issue
Block a user