Add docker deployment machinery

This commit is contained in:
Luke Murphy 2020-11-25 09:07:19 +01:00
parent 0e1208760c
commit 6ea79dd99b
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
3 changed files with 53 additions and 0 deletions

23
.drone.yml Normal file
View File

@ -0,0 +1,23 @@
---
kind: pipeline
name: deploy to vps.biobulkbende.org
steps:
- name: build container
image: plugins/docker
settings:
username:
from_secret: docker_reg_username
password:
from_secret: docker_reg_passwd
repo: decentral1se/biobulkbende.org
tags: latest
- name: deployment
image: decentral1se/stack-ssh-deploy:latest
settings:
stack: biobulkbende_org
deploy_key:
from_secret: drone_ssh_swarm.autonomic.zone
trigger:
branch:
- main

View File

@ -6,6 +6,8 @@ COPY ./docs /app
WORKDIR /app
RUN apk add --no-cache curl
RUN npm install http-server
CMD ["npm", "start"]

28
compose.yml Normal file
View File

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