From 37476d853d68b5091fadae760bac19e52fa479f5 Mon Sep 17 00:00:00 2001 From: David Frymoyer Date: Mon, 7 Mar 2022 20:51:46 -0500 Subject: [PATCH] first pass at docker --- Dockerfile | 13 +++++++++++++ docker-compose.yml | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..31dd2f4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM golang:1.17 as base + +COPY go.mod / +COPY go.sum / + +FROM base as source +# WORKDIR /app +COPY ./*.go /src/ + +RUN ls /src +RUN go build -o freego_api /src +EXPOSE 1379 +# CMD [ "./freego_api" ] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index b5d3b31..28b454e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,4 +2,6 @@ services: ui: build: ui ports: - - 3000:3000 \ No newline at end of file + - 3000:3000 + api: + build: . \ No newline at end of file