Compare commits
2 commits
38b8ee075f
...
679f43468d
Author | SHA1 | Date | |
---|---|---|---|
679f43468d | |||
98c4cd540a |
2 changed files with 9 additions and 6 deletions
|
@ -1,14 +1,12 @@
|
||||||
FROM golang:alpine
|
FROM golang:1.17-alpine3.14
|
||||||
|
|
||||||
# add ca-certificates package
|
|
||||||
RUN apk add --no-cache ca-certificates git && \
|
RUN apk add --no-cache ca-certificates git && \
|
||||||
go get -u -d github.com/mattes/migrate/cli github.com/lib/pq && \
|
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest && \
|
||||||
go build -tags 'postgres' -o ${GOPATH}/bin/migrate github.com/mattes/migrate/cli && \
|
|
||||||
mkdir -p ${GOPATH}/src/git.minhas.io/asara && \
|
mkdir -p ${GOPATH}/src/git.minhas.io/asara && \
|
||||||
cd ${GOPATH}/src/git.minhas.io/asara && \
|
cd ${GOPATH}/src/git.minhas.io/asara && \
|
||||||
git clone https://git.minhas.io/asara/sudoscientist-go-backend && \
|
git clone https://git.minhas.io/asara/sudoscientist-go-backend && \
|
||||||
cd ${GOPATH}/src/git.minhas.io/asara/sudoscientist-go-backend && \
|
cd ${GOPATH}/src/git.minhas.io/asara/sudoscientist-go-backend && \
|
||||||
go get && go build main.go && \
|
go mod init && go get && go build main.go && \
|
||||||
mv /go/bin/* /usr/local/bin/ && \
|
mv /go/bin/* /usr/local/bin/ && \
|
||||||
rm -rf /go/src && \
|
rm -rf /go/src && \
|
||||||
apk del git
|
apk del git
|
||||||
|
|
|
@ -3,6 +3,11 @@ job "sudoscientist-go-backend" {
|
||||||
region = "global"
|
region = "global"
|
||||||
type = "service"
|
type = "service"
|
||||||
|
|
||||||
|
constraint {
|
||||||
|
attribute = "${attr.cpu.arch}"
|
||||||
|
value = "arm64"
|
||||||
|
}
|
||||||
|
|
||||||
update {
|
update {
|
||||||
stagger = "30s"
|
stagger = "30s"
|
||||||
max_parallel = 1
|
max_parallel = 1
|
||||||
|
@ -79,7 +84,7 @@ UI_PROTO = https://
|
||||||
|
|
||||||
resources {
|
resources {
|
||||||
cpu = 2000
|
cpu = 2000
|
||||||
memory = 2560
|
memory = 256
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue