Containerize project

This commit is contained in:
akulij 2024-08-13 00:02:58 +03:00
parent 8ca332a0f0
commit 18a15a9c79
2 changed files with 27 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"]

17
docker-compose.yml Normal file
View File

@ -0,0 +1,17 @@
version: "3"
networks:
gitea:
external: false
services:
app:
build:
context: .
dockerfile: Dockerfile
environment:
BOTTOKEN: 7376542452:AAHO5e47cUTTWwjoXAdrRWZk61RhhabIKz8
ADMINPASSWORD: .u=J)vkzpt;7D9.dR,H6k<N6H
restart: always
volumes:
- ./storage:/storage