Make the build in docker

This commit is contained in:
Joep 2023-09-08 21:08:10 +02:00
parent 4ea66b8bd3
commit 6b268c1ee6
4 changed files with 65 additions and 12 deletions

View File

@ -1,4 +1,36 @@
* *.db
!docker/* *.bak
!docker_config.json _old
!filebrowser rice-box.go
.idea/
/filebrowser
/filebrowser.exe
/dist
.DS_Store
node_modules
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
bin/
build/
/frontend/dist/*
!/frontend/dist/.gitkeep
default.nix

View File

@ -1,8 +1,30 @@
FROM alpine:latest FROM alpine:latest as builder
RUN apk --update add ca-certificates \ RUN apk --update add ca-certificates \
mailcap \ mailcap \
curl \ curl \
jq jq \
libc6-compat \
make \
nodejs \
npm \
bash \
ncurses \
go \
git
WORKDIR /build
COPY ./ /build
RUN go mod download
RUN make build
VOLUME /srv
EXPOSE 80
FROM alpine:latest as target
WORKDIR /app
COPY healthcheck.sh /healthcheck.sh COPY healthcheck.sh /healthcheck.sh
RUN chmod +x /healthcheck.sh # Make the script executable RUN chmod +x /healthcheck.sh # Make the script executable
@ -10,10 +32,7 @@ RUN chmod +x /healthcheck.sh # Make the script executable
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \ HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
CMD /healthcheck.sh || exit 1 CMD /healthcheck.sh || exit 1
VOLUME /srv COPY docker_config.json .filebrowser.json
EXPOSE 80 COPY --from=builder /build/filebrowser filebrowser
COPY docker_config.json /.filebrowser.json ENTRYPOINT [ "./filebrowser" ]
COPY filebrowser /filebrowser
ENTRYPOINT [ "/filebrowser" ]

View File

@ -1,3 +1,4 @@
// @ts-nocheck
import { defineStore } from "pinia"; import { defineStore } from "pinia";
import dayjs from "dayjs"; import dayjs from "dayjs";
import i18n, { detectLocale } from "@/i18n"; import i18n, { detectLocale } from "@/i18n";

View File

@ -1,3 +1,4 @@
// @ts-nocheck
import { defineStore } from "pinia"; import { defineStore } from "pinia";
import { useFileStore } from "./file"; import { useFileStore } from "./file";
import { files as api } from "@/api"; import { files as api } from "@/api";