Skip to content

Commit

Permalink
Many changes to make this human readable
Browse files Browse the repository at this point in the history
  • Loading branch information
PipeItToDevNull committed Jul 14, 2024
1 parent 6fc6f2e commit 2f59423
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@ jobs:
id: push
uses: docker/build-push-action@v5
with:
context: ./linx-server
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: Containerfile

sbom-attestation:
runs-on: ubuntu-latest
Expand Down
27 changes: 27 additions & 0 deletions Containerfile
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"]

0 comments on commit 2f59423

Please sign in to comment.