Add .drone.yml and Dockerfile
All checks were successful
the build was successful

This commit is contained in:
Peter Stuifzand 2019-02-05 21:28:37 +01:00
parent 8e2dd0993a
commit 553c45cf4f
2 changed files with 38 additions and 0 deletions

24
.drone.yml Normal file
View File

@ -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

14
Dockerfile Normal file
View File

@ -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"]