chore: update project

- Updated go.mod file as part of project's migration to Code Flow.
- Upgraded Go to v1.21.4.
- Moved Go files to src folder.
- Moved Dockerfile and Kubernetes manifest files to deploy folder.
- Updated README.md.
This commit is contained in:
Dan Anglin 2023-11-17 21:14:58 +00:00
parent 5c50033787
commit 3b8a81287b
Signed by: dananglin
GPG key ID: 0C1D44CFBEE68638
8 changed files with 8 additions and 8 deletions

View file

@ -1,4 +1,4 @@
* *
!*.go !src/*.go
!go.sum !go.sum
!go.mod !go.mod

View file

@ -66,9 +66,9 @@ docker run --rm \
Alternatively you can build and run the docker image locally. Alternatively you can build and run the docker image locally.
```bash ```bash
git clone https://gitlab.com/dananglin/stock-ticker.git git clone https://codeflow.dananglin.me.uk/apollo/stock-ticker.git
cd stock-ticker cd stock-ticker
docker build -t stock-ticker . docker build -t stock-ticker -f deploy/Dockerfile .
docker run --rm \ docker run --rm \
-d \ -d \
-e SYMBOL=MSFT \ -e SYMBOL=MSFT \

View file

@ -1,17 +1,17 @@
FROM golang:1.19.6-alpine AS builder FROM golang:1.21.4-alpine AS builder
ENV CGO_ENABLED=0 ENV CGO_ENABLED=0
ENV GOOS=linux ENV GOOS=linux
ENV GOARCH=amd64 ENV GOARCH=amd64
ADD *.go /workspace/ ADD src/*.go /workspace/
ADD go.mod /workspace/ ADD go.mod /workspace/
WORKDIR /workspace WORKDIR /workspace
RUN go build -a -v -ldflags="-s -w" -o /workspace/stock-ticker . RUN go build -a -v -ldflags="-s -w" -o /workspace/stock-ticker .
FROM gcr.io/distroless/static-debian11 FROM gcr.io/distroless/static-debian12
COPY --from=builder /workspace/stock-ticker /stock-ticker COPY --from=builder /workspace/stock-ticker /stock-ticker

4
go.mod
View file

@ -1,3 +1,3 @@
module gitlab.com/dananglin/stock-ticker module codeflow.dananglin.me.uk/apollo/stock-ticker
go 1.19 go 1.21