Added docker on backend
This commit is contained in:
parent
9ecd74a82d
commit
efe26cc454
2 changed files with 22 additions and 0 deletions
13
backend/Dockerfile
Normal file
13
backend/Dockerfile
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
FROM golang:1.25.3 AS build
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN GOOS=linux GOARCH=amd64 go build -pgo=auto -ldflags="-s -w" -o bin/esign-server main.go
|
||||
|
||||
FROM alpine:latest
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/bin/esign-server .
|
||||
EXPOSE 4320
|
||||
CMD ["./esign-server"]
|
||||
9
backend/docker-compose.yml
Normal file
9
backend/docker-compose.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
services:
|
||||
e-sign-server:
|
||||
container_name: e-sign-server
|
||||
restart: unless-stopped
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- 4320:4320
|
||||
Loading…
Add table
Add a link
Reference in a new issue