Skip to content

Commit

Permalink
Add Docker support
Browse files Browse the repository at this point in the history
  • Loading branch information
hgw8 committed Oct 4, 2023
1 parent e4f255c commit 37ac0f9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Dockerfile
docker-compose.yml
.gitignore
README.md
config.toml
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 37ac0f9

Please sign in to comment.