Add swarm deploy setup

This commit is contained in:
Luke Murphy 2020-06-25 15:38:57 +02:00
parent 2b8ed3de5c
commit b2db25655d
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
4 changed files with 66 additions and 7 deletions

View File

@ -1,14 +1,31 @@
---
kind: pipeline
name: default
name: deploy to swarm.autonomic.zone
steps:
- name: Deploy wiki with Dokku
image: appleboy/drone-git-push:0.2.0-linux-amd64
- name: bundle static
image: plugins/docker
settings:
remote: ssh://dokku@dokku.autonomic.zone:222/kawaiipunk.xyz
ssh_key:
from_secret: drone_deploy_key
username:
from_secret: docker_reg_username
password:
from_secret: docker_reg_passwd
repo: decentral1se/kawaiipunk.xyz
tags: v0.1.0
- name: deployment
image: decentral1se/drone-stack:19.03.8
settings:
compose: compose.yml
host: tcp://swarm.autonomic.zone:2376
stack_name: kawaiipunk-xyz
tlsverify: true
environment:
PLUGIN_CACERT:
from_secret: docker_cacert
PLUGIN_CERT:
from_secret: docker_cert
PLUGIN_KEY:
from_secret: docker_key
trigger:
branch:
- master

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM python:3.8-alpine
EXPOSE 8000
COPY . .
ENTRYPOINT ["/bin/sh"]
RUN apk add --no-cache curl
CMD ["-c", "python -m http.server --bind 0.0.0.0 --directory . 8000"]

View File

@ -1,4 +1,7 @@
# Welcome to KawaiiPunk's Walkaway Wiki
[![Build Status](https://drone.autonomic.zone/api/badges/kawaiipunk/walkaway-wiki/status.svg)](https://drone.autonomic.zone/kawaiipunk/walkaway-wiki)
This is an experimental attempt to create a "walkaway wiki" as referenced in Cory Doctorow's book **Walkaway**. It is hosted on the Peer to Peer web and then mirrored to the old web. It's nothing fancy. I will just be using it as a blog and mind dump for my solarpunk explorations. Enjoy.
You can find it on dat:

28
compose.yml Normal file
View File

@ -0,0 +1,28 @@
---
version: "3.8"
services:
mkdocs:
image: "decentral1se/kawaiipunk.xyz:v0.1.0"
networks:
- proxy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"]
interval: 10s
timeout: 10s
retries: 10
start_period: 5s
deploy:
update_config:
failure_action: rollback
order: start-first
labels:
- "traefik.enable=true"
- "traefik.http.services.mkdocs.loadbalancer.server.port=8000"
- "traefik.http.routers.mkdocs.rule=Host(`kawaiipunk.xyz`)"
- "traefik.http.routers.mkdocs.entrypoints=web-secure"
- "traefik.http.routers.mkdocs.tls.certresolver=production"
networks:
proxy:
external: true