mirror of
https://github.com/derfenix/webarchive.git
synced 2026-03-11 12:41:54 +03:00
Add Dockerfile and docker-compose.yaml
This commit is contained in:
15
.dockerignore
Normal file
15
.dockerignore
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
.idea
|
||||||
|
*~
|
||||||
|
.fuse_hidden*
|
||||||
|
.directory
|
||||||
|
.Trash-*
|
||||||
|
.nfs*
|
||||||
|
*.exe
|
||||||
|
*.exe~
|
||||||
|
*.dll
|
||||||
|
*.so
|
||||||
|
*.dylib
|
||||||
|
*.test
|
||||||
|
*.out
|
||||||
|
go.work
|
||||||
|
db
|
||||||
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
FROM golang:1.20-alpine as builder
|
||||||
|
|
||||||
|
WORKDIR /project
|
||||||
|
ADD go.* ./
|
||||||
|
RUN go mod download
|
||||||
|
ADD . .
|
||||||
|
RUN CGO_ENABLED=0 go build -o service ./cmd/service/main.go
|
||||||
|
|
||||||
|
FROM surnet/alpine-wkhtmltopdf:3.17.0-0.12.6-full
|
||||||
|
|
||||||
|
WORKDIR /project
|
||||||
|
COPY --from=builder /project/service service
|
||||||
|
ENTRYPOINT ["./service"]
|
||||||
16
docker-compose.yaml
Normal file
16
docker-compose.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
webarchive:
|
||||||
|
build:
|
||||||
|
dockerfile: ./Dockerfile
|
||||||
|
context: .
|
||||||
|
environment:
|
||||||
|
LOGGING_DEBUG: true
|
||||||
|
API_ADDRESS: 0.0.0.0:5001
|
||||||
|
PDF_DPI: 300
|
||||||
|
DB_PATH: /db
|
||||||
|
volumes:
|
||||||
|
- ./db:/db
|
||||||
|
ports:
|
||||||
|
- "0.0.0.0:5002:5001"
|
||||||
Reference in New Issue
Block a user