feat(docker): add deployment

This commit is contained in:
nikurasu 2024-03-08 21:19:17 +01:00
parent 28594fc532
commit 0cb0da2491
Signed by: Nikurasu
GPG key ID: 9E7F14C03EF1F271
2 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,12 @@
FROM golang:alpine3.22 AS build
WORKDIR /build
COPY ./src ./src
WORKDIR /build/src
RUN apk add gcc libc-dev
RUN go get .
RUN CGO_ENABLED=1 go build -o /build/uf-bob
FROM alpine:3.17 AS final
COPY --from=build /build/uf-bob /bin/uf-bob
COPY --from=build /build/migrations /pb_migrations
ENTRYPOINT [ "/bin/uf-bob", "serve", "--http=0.0.0.0:80", "--dir=/pb_data", "--public-dir=/pb_public", "--migrationsDir=/pb_migrations" ]

View file

@ -0,0 +1,12 @@
version: '3'
services:
uf-bob:
image: dev.cat-enby.club/Ulmer-Furs/uf-bob:0.1
restart: allways
environment:
- ADMIN_EMAIL=test@example.com
- ADMIN_PASS=password
volumes:
- /PATH/TO/STORAGE:/pb_data
ports:
- 3000:80