CI/CD
continuous-integration/drone/push Build is failing Details

This commit is contained in:
DutchEllie 2022-03-12 16:22:41 +01:00
parent cb3c3c8d30
commit fe76cd80f8
Signed by: DutchEllie
SSH Key Fingerprint: SHA256:dKq6ZSgN5E3Viqrw/+xAdf2VdR6hdRGNyrYqXXwfjTY
4 changed files with 31 additions and 7 deletions

15
.drone.yml Normal file
View File

@ -0,0 +1,15 @@
kind: pipeline
type: kubernetes
name: default
steps:
- name: docker
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: dutchellie/proper-website-2
target: api
tags: latest

15
Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM golang:1.17.8-alpine AS builder
WORKDIR /project
ADD . /project/
RUN go mod tidy
RUN GOARCH=wasm GOOS=js go build -o web/app.wasm
RUN go build -o app
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /project/web ./web/
COPY --from=builder /project/app ./
EXPOSE 8000
CMD ["./app"]

View File

@ -1,12 +1,6 @@
build:
GOARCH=wasm GOOS=js go build -o web/app.wasm
cp web/app.wasm staticsite/web/app.wasm
scp staticsite/web/app.wasm ellieserver:/home/ellie/nicecock/test/web/
go build -o app
build-all: build
cp -r web/* staticsite/web/
scp -r staticsite/* ellieserver:/home/ellie/nicecock/test
run: build
./app

View File

@ -11,7 +11,7 @@ import (
)
const (
apiurl = "https://api.quenten.nl/"
apiurl = "https://api.nicecock.eu/"
)
type Homepage struct {