~comcloudway/pages

cfd651d8d6f6e7342ebd4b12bc52b92390fd4f7e — Jakob Meier 1 year, 3 months ago 69d9dc0
Updated CI to new server backend
2 files changed, 13 insertions(+), 28 deletions(-)

M .woodpecker.yml
M README.org
M .woodpecker.yml => .woodpecker.yml +10 -7
@@ 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

M README.org => README.org +3 -21
@@ 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.