Compare commits
2 Commits
853bee22db
...
7fc73921d3
| Author | SHA1 | Date | |
|---|---|---|---|
| 7fc73921d3 | |||
| e8d042b65e |
25
.gitignore
vendored
25
.gitignore
vendored
@@ -1,26 +1,3 @@
|
||||
# Allowlisting gitignore template for GO projects prevents us
|
||||
# from adding various unwanted local files, such as generated
|
||||
# files, developer configurations or IDE-specific files etc.
|
||||
#
|
||||
# Recommended: Go.AllowList.gitignore
|
||||
|
||||
# Ignore everything
|
||||
*
|
||||
|
||||
.env
|
||||
# But not these files...
|
||||
!/.gitignore
|
||||
|
||||
!*.go
|
||||
!go.sum
|
||||
!go.mod
|
||||
|
||||
!README.md
|
||||
!LICENSE
|
||||
|
||||
# !Makefile
|
||||
|
||||
# ...even if they are in subdirectories
|
||||
!*/
|
||||
!.gitea/*
|
||||
!.gitea/workflows/*
|
||||
.swp
|
||||
|
||||
16
code/.gitignore
vendored
Normal file
16
code/.gitignore
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
# Allowlisting gitignore template for GO projects prevents us
|
||||
# from adding various unwanted local files, such as generated
|
||||
# files, developer configurations or IDE-specific files etc.
|
||||
#
|
||||
# Recommended: Go.AllowList.gitignore
|
||||
|
||||
# Ignore everything
|
||||
*
|
||||
|
||||
.env
|
||||
# But not these files...
|
||||
!/.gitignore
|
||||
|
||||
!*.go
|
||||
!go.sum
|
||||
!go.mod
|
||||
@@ -1,2 +1 @@
|
||||
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
||||
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||
20
docker/Dockerfile
Normal file
20
docker/Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM golang:1.23-bookworm AS base
|
||||
|
||||
# /build is the working directory
|
||||
WORKDIR /build
|
||||
|
||||
# Copy control files and pull in dependencies
|
||||
COPY go.mod .
|
||||
RUN go mod download
|
||||
|
||||
ENV port=8089
|
||||
# Copy the rest of the source code into the container
|
||||
COPY code/* .
|
||||
|
||||
# Build the app
|
||||
|
||||
RUN go build -o fibonacci
|
||||
|
||||
EXPOSE ${port}
|
||||
|
||||
CMD ["build/fibonacci"]
|
||||
Reference in New Issue
Block a user