diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1283c89 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM golang:1.17 as base + +WORKDIR /app +COPY go.mod . +COPY go.sum . + +FROM base as source +COPY ./*.go /app/ + +RUN ls /app/ +RUN go build -o freego_api . +EXPOSE 1379 +CMD [ "./freego_api" ] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index b5d3b31..c4a5f21 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,4 +2,8 @@ services: ui: build: ui ports: - - 3000:3000 \ No newline at end of file + - 3000:3000 + api: + build: . + ports: + - 1379:1379 \ No newline at end of file