Skip to content

Commit

Permalink
dockerfile added
Browse files Browse the repository at this point in the history
  • Loading branch information
somnathbm committed Nov 22, 2024
1 parent 1c2ca81 commit bb1530e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.env
.vscode
.github
.gitignore
.dockerignore
.DS_Store
18 changes: 18 additions & 0 deletions src/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM golang:alpine AS build
WORKDIR /app

COPY go.mod go.sum ./
RUN go mod download

COPY ./api ./api/
COPY ./db ./db/
COPY ./models ./models/
COPY main.go ./main.go

RUN go build -o ./dist/hms-patient-mgmt.sh

FROM golang:alpine AS run
WORKDIR /app
COPY --from=build --chmod=500 /app/dist/hms-patient-mgmt.sh ./
EXPOSE 8080
CMD ["./hms-patient-mgmt.sh"]

0 comments on commit bb1530e

Please sign in to comment.