From 553c45cf4f6c0fae7a2ba7ba5cb95716995be465 Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Tue, 5 Feb 2019 21:28:37 +0100 Subject: [PATCH] Add .drone.yml and Dockerfile --- .drone.yml | 24 ++++++++++++++++++++++++ Dockerfile | 14 ++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..d58b5e7 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,24 @@ +pipeline: + publish: + image: plugins/docker + repo: registry.stuifzandapp.com/wiki + registry: registry.stuifzandapp.com + secrets: [ docker_username, docker_password ] + + # deploy: + # image: appleboy/drone-ssh + # host: wiki.p83.nl + # username: microsub + # secrets: ['ssh_key'] + # script: + # - cd /home/microsub/microsub + # - docker-compose pull web + # - docker-compose up -d + + # notify: + # image: plugins/webhook + # settings: + # debug: true + # secrets: + # - source: result_webhook + # target: plugin_urls diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2d541a2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +# build stage +FROM golang:1.10.2-alpine3.7 AS build-env +RUN apk --no-cache add git +RUN go get p83.nl/go/wiki/... + +# final stage +FROM alpine +RUN apk --no-cache add ca-certificates git +EXPOSE 80 +COPY --from=build-env /go/bin/wiki /app/ +RUN ["mkdir", "/app/templates"] +COPY --from=build-env /go/src/p83.nl/go/wiki/templates /app/templates +WORKDIR /app +ENTRYPOINT ["/app/wiki"]