Initial QSfera import

This commit is contained in:
Курнат Андрей
2026-06-07 10:20:04 +03:00
commit 2315f25754
16485 changed files with 4826827 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
FROM golang:alpine3.23 AS build
ARG TARGETOS
ARG TARGETARCH
ARG VERSION
ARG STRING
ARG EDITION="dev"
RUN apk add bash make git curl gcc musl-dev libc-dev binutils-gold inotify-tools vips-dev
WORKDIR /build
RUN --mount=type=bind,target=/build,rw \
--mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache \
GOOS="${TARGETOS:-linux}" GOARCH="${TARGETARCH:-amd64}" ; \
make -C qsfera release-linux-docker-${TARGETARCH} ENABLE_VIPS=true DIST=/dist
FROM alpine:3.23
ARG VERSION
ARG REVISION
ARG TARGETOS
ARG TARGETARCH
RUN apk add --no-cache attr bash ca-certificates curl imagemagick \
inotify-tools libc6-compat mailcap tree vips \
vips-magick patch && \
echo 'hosts: files dns' >| /etc/nsswitch.conf
LABEL maintainer="QSfera" \
org.opencontainers.image.title="КуСфера" \
org.opencontainers.image.vendor="QSfera" \
org.opencontainers.image.authors="QSfera" \
org.opencontainers.image.description="КуСфера file-sync and share platform" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.documentation="" \
org.opencontainers.image.url="" \
org.opencontainers.image.source="" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.revision="${REVISION}"
RUN addgroup -g 1000 -S qsfera-group && \
adduser -S --ingroup qsfera-group --uid 1000 qsfera-user --home /var/lib/qsfera
RUN mkdir -p /var/lib/qsfera && \
# Pre-create the web directory to avoid permission issues
mkdir -p /var/lib/qsfera/web/assets/apps && \
chown -R qsfera-user:qsfera-group /var/lib/qsfera && \
chmod -R 751 /var/lib/qsfera && \
mkdir -p /etc/qsfera && \
chown -R qsfera-user:qsfera-group /etc/qsfera && \
chmod -R 751 /etc/qsfera
VOLUME [ "/var/lib/qsfera", "/etc/qsfera" ]
WORKDIR /var/lib/qsfera
USER 1000
EXPOSE 9200/tcp
ENTRYPOINT ["/usr/bin/qsfera"]
CMD ["server"]
COPY --from=build /dist/binaries/qsfera-linux-${TARGETARCH} /usr/bin/qsfera