From b8c033d04e98a61da449c05c265cf48e10cdf11b Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Thu, 15 Jul 2021 02:13:30 +0700 Subject: [PATCH] build: config --- api/.dockerignore | 21 +++++++++++++++++++++ api/Dockerfile | 4 ++-- heroku.yml | 4 +++- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 api/.dockerignore diff --git a/api/.dockerignore b/api/.dockerignore new file mode 100644 index 0000000..94859b2 --- /dev/null +++ b/api/.dockerignore @@ -0,0 +1,21 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +vendor/ + +# Environment variable +.env + +# Heroku bin directory +bin \ No newline at end of file diff --git a/api/Dockerfile b/api/Dockerfile index 501bf0e..6d822c4 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /app COPY . . -RUN go mod download -v +RUN go mod download RUN go build -v main.go -CMD ["main"] \ No newline at end of file +CMD ["./main"] \ No newline at end of file diff --git a/heroku.yml b/heroku.yml index 825aef7..6a55baa 100644 --- a/heroku.yml +++ b/heroku.yml @@ -1,3 +1,5 @@ build: docker: - web: api/Dockerfile \ No newline at end of file + web: api/Dockerfile + config: + ENV: production \ No newline at end of file