[Add docker stuff]
This commit is contained in:
parent
3088330067
commit
eb13797693
2 changed files with 28 additions and 0 deletions
21
Dockerfile
Normal file
21
Dockerfile
Normal file
|
@ -0,0 +1,21 @@
|
|||
FROM golang:1.23.4-alpine3.21 AS build-stage
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY ./go.mod ./go.sum ./
|
||||
RUN [ "go", "mod", "download" ]
|
||||
|
||||
COPY *.go ./
|
||||
RUN [ "go", "build", "." ]
|
||||
|
||||
FROM alpine:3.14 AS prod-stage
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=build-stage /usr/src/app/binaryimage .
|
||||
COPY ./static/ ./static/
|
||||
COPY ./views/ ./views/
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ENTRYPOINT [ "./binaryimage" ]
|
7
docker-compose.yml
Normal file
7
docker-compose.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
services:
|
||||
binaryimage:
|
||||
build: .
|
||||
environment:
|
||||
- BI_MAX_FILE_SIZE=4194304 # 4MiB
|
||||
ports:
|
||||
- "3000:3000"
|
Loading…
Add table
Reference in a new issue