Add Docker support
This commit is contained in:
parent
e4f255c074
commit
37ac0f9e50
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@ -0,0 +1,5 @@
|
||||
Dockerfile
|
||||
docker-compose.yml
|
||||
.gitignore
|
||||
README.md
|
||||
config.toml
|
8
Dockerfile
Normal file
8
Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM golang:1.21-alpine
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY *.go ./
|
||||
RUN go build -o hardfiles main.go
|
||||
RUN mkdir files
|
||||
CMD ["./hardfiles"]
|
10
docker-compose.yml
Normal file
10
docker-compose.yml
Normal file
@ -0,0 +1,10 @@
|
||||
services:
|
||||
hardfiles:
|
||||
container_name: hardfiles
|
||||
build: .
|
||||
volumes:
|
||||
- "$PWD/files:/app/files"
|
||||
- "$PWD/www:/app/www"
|
||||
- "$PWD/config.toml:/app/config.toml"
|
||||
ports:
|
||||
- "5000:5000"
|
Loading…
Reference in New Issue
Block a user