From cfd651d8d6f6e7342ebd4b12bc52b92390fd4f7e Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Sun, 4 Jun 2023 15:56:29 +0200 Subject: [PATCH] Updated CI to new server backend --- .woodpecker.yml | 17 ++++++++++------- README.org | 24 +++--------------------- 2 files changed, 13 insertions(+), 28 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 97d0058..ef8ac8d 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,12 +1,15 @@ pipeline: + # build static content build: image: alpine - commands: | - apk add sed pandoc - sh ./build.sh + commands: + - apk add sed pandoc + - sh ./build.sh + # publish content publish: image: alpine - secrets: [ ssh_deploy_pass ] - commands: | - apk add rsync openssh sshpass - rsync -ratlzv --rsh="sshpass -p $ssh_deploy_pass -e ssh -o StrictHostKeyChecking=no -l deploy -p 29493" ./build deploy@ccw.icu:/home/deploy/upload + secrets: [ deploy_pass ] + commands: + - apk add rsync + - export RSYNC_PASSWORD="$${DEPLOY_PASS}" + - rsync -Irtlzv ./build/* rsync://deploy@ccw.icu:29493/pages diff --git a/README.org b/README.org index 709407e..e2c31c0 100644 --- a/README.org +++ b/README.org @@ -20,25 +20,7 @@ To get a local server running, you can use ~serve build~ ** Hosting -I found that the easiest way to host static files is using nginx -and a sftp server. -#+begin_src yaml -version: '3' +I'm currently using ~nginx~ and ~rsyncd~, +running in separate docker containers. -services: - backend: - image: atmoz/sftp:alpine - volumes: - # [...] addition config - - ./files:/home/deploy/upload - ports: - - 29493:22 - # [...] addition config - frontend: - image: nginx:mainline-alpine - volumes: - - ./files:/usr/share/nginx/html/:ro - - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro - ports: - - 9493:80 -#+end_src +Have a look at my [[https://codeberg.org/comcloudway/docker-rsyncd/src/branch/main/docker-compose.yml][docker-rsyncd]] image for more information. -- 2.38.5