Put the api in docker #2

Merged
fry merged 3 commits from dockerize-api into master 2022-03-07 21:43:36 -05:00
2 changed files with 10 additions and 8 deletions
Showing only changes of commit 7b924ffa06 - Show all commits

View File

@ -1,13 +1,13 @@
FROM golang:1.17 as base
COPY go.mod /
COPY go.sum /
WORKDIR /app
COPY go.mod .
COPY go.sum .
FROM base as source
# WORKDIR /app
COPY ./*.go /src/
COPY ./*.go /app/
RUN ls /src
RUN go build -o freego_api /src
RUN ls /app/
RUN go build -o freego_api .
EXPOSE 1379
# CMD [ "./freego_api" ]
CMD [ "./freego_api" ]

View File

@ -4,4 +4,6 @@ services:
ports:
- 3000:3000
api:
build: .
build: .
ports:
- 1379:1379