feat(docker): add deployment
This commit is contained in:
parent
28594fc532
commit
0cb0da2491
2 changed files with 24 additions and 0 deletions
12
dev/docker/images/production/Dockerfile
Normal file
12
dev/docker/images/production/Dockerfile
Normal 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" ]
|
12
dev/docker/stacks/production/docker-compose.yml
Normal file
12
dev/docker/stacks/production/docker-compose.yml
Normal 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
|
Loading…
Reference in a new issue