diff options
author | Matthew Lemon <y@yulqen.org> | 2024-04-06 11:48:32 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-04-06 11:51:12 +0100 |
commit | e7e517b822333188ea34f4a4ba83de2253cfe869 (patch) | |
tree | 7c467051ec95e13e1db3925bf80c8b27c40a97db | |
parent | a931a4637f6d51de4059df6d0d72d147e4775018 (diff) |
Reorganises cmd/ structure for publication on pkg.go.dev
Adds key commands to Makefile
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Dockerfile | 2 | ||||
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | cmd/dbasik-api/datamaps.go (renamed from cmd/api/datamaps.go) | 0 | ||||
-rw-r--r-- | cmd/dbasik-api/errors.go (renamed from cmd/api/errors.go) | 0 | ||||
-rw-r--r-- | cmd/dbasik-api/healthcheck.go (renamed from cmd/api/healthcheck.go) | 0 | ||||
-rw-r--r-- | cmd/dbasik-api/helpers.go (renamed from cmd/api/helpers.go) | 0 | ||||
-rw-r--r-- | cmd/dbasik-api/main.go (renamed from cmd/api/main.go) | 0 | ||||
-rw-r--r-- | cmd/dbasik-api/routes.go (renamed from cmd/api/routes.go) | 0 |
9 files changed, 7 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e660fd9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +bin/ @@ -5,6 +5,6 @@ WORKDIR /app COPY go.mod ./ RUN go mod download && go mod verify COPY . . -RUN go build -v -o /usr/local/bin/app ./cmd/api +RUN go build -v -o /usr/local/bin/app ./cmd/dbasik-api CMD ["app"] EXPOSE 4000 @@ -0,0 +1,5 @@ +build: + @docker build -t dbasik:latest . + +run: + @docker run -it --rm -p 4000:4000 dbasik:latest diff --git a/cmd/api/datamaps.go b/cmd/dbasik-api/datamaps.go index 8d371ab..8d371ab 100644 --- a/cmd/api/datamaps.go +++ b/cmd/dbasik-api/datamaps.go diff --git a/cmd/api/errors.go b/cmd/dbasik-api/errors.go index 5f5122a..5f5122a 100644 --- a/cmd/api/errors.go +++ b/cmd/dbasik-api/errors.go diff --git a/cmd/api/healthcheck.go b/cmd/dbasik-api/healthcheck.go index 3378c6e..3378c6e 100644 --- a/cmd/api/healthcheck.go +++ b/cmd/dbasik-api/healthcheck.go diff --git a/cmd/api/helpers.go b/cmd/dbasik-api/helpers.go index 3b07dc2..3b07dc2 100644 --- a/cmd/api/helpers.go +++ b/cmd/dbasik-api/helpers.go diff --git a/cmd/api/main.go b/cmd/dbasik-api/main.go index fc03d33..fc03d33 100644 --- a/cmd/api/main.go +++ b/cmd/dbasik-api/main.go diff --git a/cmd/api/routes.go b/cmd/dbasik-api/routes.go index f884855..f884855 100644 --- a/cmd/api/routes.go +++ b/cmd/dbasik-api/routes.go |