Containerize project

This commit is contained in:
akulij 2024-08-13 00:02:58 +03:00
parent 8ca332a0f0
commit 9d8b212d06
2 changed files with 24 additions and 0 deletions

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM golang:alpine
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o app ./cmd/app
WORKDIR /storage
CMD ["/build/app"]

14
docker-compose.yml Normal file
View File

@ -0,0 +1,14 @@
version: "3"
networks:
gitea:
external: false
services:
app:
build:
context: .
dockerfile: Dockerfile
restart: always
volumes:
- ./storage:/storage