Use newer drone and Dockerfile
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
2b9150a5a3
commit
caf7e4a900
41
.drone.yml
41
.drone.yml
|
|
@ -1,24 +1,39 @@
|
||||||
pipeline:
|
kind: pipeline
|
||||||
publish:
|
name: default
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
base: /go
|
||||||
|
path: src/p83.nl/go/ekster
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: testing
|
||||||
|
image: golang:1.12-alpine
|
||||||
|
commands:
|
||||||
|
- export GOPATH=/go
|
||||||
|
- export CGO_ENABLED=0
|
||||||
|
- apk --no-cache add git
|
||||||
|
- go get -d -t ./...
|
||||||
|
- go build p83.nl/go/ekster/cmd/eksterd
|
||||||
|
- go test ./...
|
||||||
|
|
||||||
|
- name: publish
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
repo: registry.stuifzandapp.com/microsub-server
|
repo: registry.stuifzandapp.com/microsub-server
|
||||||
registry: registry.stuifzandapp.com
|
registry: registry.stuifzandapp.com
|
||||||
secrets: [ docker_username, docker_password ]
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
|
||||||
deploy:
|
- name: deploy
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
|
settings:
|
||||||
host: microsub.stuifzandapp.com
|
host: microsub.stuifzandapp.com
|
||||||
username: microsub
|
username: microsub
|
||||||
secrets: ['ssh_key']
|
ssh_key:
|
||||||
|
from_secret: ssh_key
|
||||||
script:
|
script:
|
||||||
- cd /home/microsub/microsub
|
- cd /home/microsub/microsub
|
||||||
- docker-compose pull web
|
- docker-compose pull web
|
||||||
- docker-compose up -d
|
- docker-compose up -d
|
||||||
|
|
||||||
notify:
|
|
||||||
image: plugins/webhook
|
|
||||||
settings:
|
|
||||||
debug: true
|
|
||||||
secrets:
|
|
||||||
- source: result_webhook
|
|
||||||
target: plugin_urls
|
|
||||||
|
|
|
||||||
13
Dockerfile
13
Dockerfile
|
|
@ -1,16 +1,7 @@
|
||||||
# build stage
|
|
||||||
FROM golang:1.10.2-alpine3.7 AS build-env
|
|
||||||
RUN apk --no-cache add git
|
|
||||||
RUN go get p83.nl/go/ekster/...
|
|
||||||
|
|
||||||
# final stage
|
|
||||||
FROM alpine
|
FROM alpine
|
||||||
RUN apk --no-cache add ca-certificates
|
RUN apk --no-cache add ca-certificates
|
||||||
RUN ["mkdir", "-p", "/opt/micropub"]
|
|
||||||
WORKDIR /opt/micropub
|
WORKDIR /opt/micropub
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
COPY --from=build-env /go/bin/eksterd /app/
|
COPY /go/bin/eksterd /app/
|
||||||
RUN ["mkdir", "/app/templates"]
|
COPY /go/src/p83.nl/go/ekster/templates /app/templates
|
||||||
COPY --from=build-env /go/src/p83.nl/go/ekster/templates /app/templates
|
|
||||||
ENTRYPOINT ["/app/eksterd"]
|
ENTRYPOINT ["/app/eksterd"]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user