Skip to content

Commit 77bb83f

Browse files
author
lai0xn
committed
docker setup
1 parent dc080ab commit 77bb83f

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Dockerfile

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Specifies a parent image
2+
FROM golang:1.21
3+
4+
# Creates an app directory to hold your app’s source code
5+
WORKDIR /app
6+
7+
# Copies everything from your root directory into /app
8+
COPY . .
9+
10+
RUN go run github.com/steebchen/prisma-client-go generate --schema ./prisma
11+
12+
13+
# Installs Go dependencies
14+
RUN go mod tidy
15+
16+
RUN go run github.com/steebchen/prisma-client-go generate --schema ./prisma
17+
18+
# Builds your app with optional configuration
19+
RUN go build ./cmd/server
20+
21+
# Tells Docker which network port your container listens on
22+
EXPOSE 8080
23+
24+
25+
26+
RUN chmod a+x ./server
27+
# Specifies the executable command that runs when the container starts
28+
CMD [ "./server" ]

0 commit comments

Comments
 (0)