-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Many changes to make this human readable
- Loading branch information
1 parent
6fc6f2e
commit 2f59423
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM golang:1.22-alpine3.20 AS build | ||
|
||
RUN set -ex \ | ||
&& apk add --no-cache --virtual .build-deps git | ||
|
||
COPY linx-server /app | ||
WORKDIR /app | ||
RUN mkdir dist && go build -o dist/ | ||
|
||
FROM alpine:3.20 | ||
|
||
COPY --from=build /app/dist/linx-server /usr/local/bin/linx-server | ||
|
||
ENV GOPATH /go | ||
ENV SSL_CERT_FILE /etc/ssl/cert.pem | ||
|
||
COPY linx-server/static /app/static/ | ||
COPY linx-server/templates /app/templates/ | ||
|
||
RUN mkdir -p /data/files && mkdir -p /data/meta && mkdir -p /data/locks && chown -R 65534:65534 /data | ||
|
||
VOLUME ["/data/files", "/data/meta", "/data/locks"] | ||
|
||
EXPOSE 8080 | ||
USER nobody | ||
ENTRYPOINT ["/usr/local/bin/linx-server", "-bind=0.0.0.0:8080", "-filespath=/data/files/", "-metapath=/data/meta/", "-lockspath=/data/locks/"] | ||
CMD ["-sitename=linx", "-allowhotlink"] |