Skip to content

Commit

Permalink
fix: update app
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Buchleitner <[email protected]>
  • Loading branch information
mabunixda committed Dec 6, 2024
1 parent 3325bdb commit 699cd05
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
4 changes: 3 additions & 1 deletion docker-image/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---

build:
image: docker:20.10.16
stage: build
Expand All @@ -7,5 +9,5 @@ build:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $IMAGE_TAG .
- docker buildx build -t $IMAGE_TAG .
- docker push $IMAGE_TAG
12 changes: 5 additions & 7 deletions docker-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
FROM golang:1.20.0
FROM golang:1.23 AS builder

ENV REDIS-SERVICE-NAME="redis"


WORKDIR /app
ADD go.* main.go ./
RUN go mod download \
&& CGO_ENABLED=0 GOOS=linux go build -o main .
&& CGO_ENABLED=0 go build -o main .

FROM scratch
WORKDIR /app
COPY --from=0 /app/main .
COPY ./public/index.html public/index.html
COPY ./public/script.js public/script.js
COPY ./public/style.css public/style.css
CMD ["/app/main"]
COPY --from=builder /app/main .
COPY ./public /app/public/
ENTRYPOINT ["/app/main"]
EXPOSE 3000
1 change: 0 additions & 1 deletion docker-image/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ require (
)

require (
github.com/garyburd/redigo v1.6.4 // indirect
github.com/gomodule/redigo v1.8.9 // indirect
github.com/xyproto/pinterface v1.5.3 // indirect
)
12 changes: 4 additions & 8 deletions docker-image/go.sum
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
github.com/codegangsta/negroni v1.0.0 h1:+aYywywx4bnKXWvoWtRfJ91vC59NbEhEY03sZjQhbVY=
github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/garyburd/redigo v1.6.4 h1:LFu2R3+ZOPgSMWMOL+saa/zXRjw0ID2G8FepO53BGlg=
github.com/garyburd/redigo v1.6.4/go.mod h1:rTb6epsqigu3kYKBnaF028A7Tf/Aw5s0cqA47doKKqw=
github.com/gomodule/redigo v1.8.8 h1:f6cXq6RRfiyrOJEV7p3JhLDlmawGBVBBP1MggY8Mo4E=
github.com/gomodule/redigo v1.8.8/go.mod h1:7ArFNvsTjH8GMMzB4uy1snslv2BwmginuMs06a1uzZE=
github.com/gomodule/redigo v1.8.9 h1:Sl3u+2BI/kk+VEatbj0scLdrFhjPmbxOc1myhDP41ws=
github.com/gomodule/redigo v1.8.9/go.mod h1:7ArFNvsTjH8GMMzB4uy1snslv2BwmginuMs06a1uzZE=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/xyproto/pinterface v1.5.3 h1:RKkNT88cwrSqD9hU4cYAO5yeo8srg4TG+74Pcj88iz0=
github.com/xyproto/pinterface v1.5.3/go.mod h1:X5B5pKE49ak7SpyDh5QvJvLH9cC9XuZNDcl5hEyYc34=
github.com/xyproto/simpleredis v0.0.0-20150523000142-9f9bdf9000d1 h1:+vB14RyCTr3FERRzenZftip8alGqRbhx7kzS5za9/VQ=
github.com/xyproto/simpleredis v0.0.0-20150523000142-9f9bdf9000d1/go.mod h1:uSYFxIza9OX4jlWn/KHQRd0YDCXza/L/S4WatobDE0U=
github.com/xyproto/simpleredis v0.0.0-20220117114834-9a1000fbd7af h1:cysD3MzP3R/pQETtrLsxudVsc79USsWNFY27kYooQbY=
github.com/xyproto/simpleredis v0.0.0-20220117114834-9a1000fbd7af/go.mod h1:klBJiwXWN4OvxC5qVNAr7RnRYowZh9WyeAJoU6aZjZ0=
github.com/xyproto/simpleredis v0.0.0-20230406121716-97efc4f25bf1 h1:d//7H6H837U72eycvfiPi/JsvbNMVbqKvcpveu6YpaA=
github.com/xyproto/simpleredis v0.0.0-20230406121716-97efc4f25bf1/go.mod h1:/rLBRnXHiELDjKl1mJ6xTgVxXtwGaFl5Q1VH+Eogzhc=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 comments on commit 699cd05

Please sign in to comment.