mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-13 16:40:01 +00:00
Update to 2.0.0.beta3
Added entrypoint to Docker image Fixed issues with CORS when behind reverse-proxy Added APP_URL environment variable
This commit is contained in:
+16
-6
@@ -1,26 +1,36 @@
|
||||
# syntax=docker/dockerfile:1.4
|
||||
FROM eclipse-temurin:21-jre-alpine
|
||||
|
||||
MAINTAINER grimsi
|
||||
|
||||
# Install necessary packages
|
||||
RUN apk add --no-cache su-exec tini shadow
|
||||
|
||||
ENV USER=gameyfin
|
||||
|
||||
RUN addgroup gameyfin && \
|
||||
adduser --disabled-password --gecos "" --ingroup "$USER" --no-create-home "$USER"
|
||||
|
||||
USER gameyfin:gameyfin
|
||||
|
||||
WORKDIR /opt/gameyfin
|
||||
|
||||
# Create necessary directories with appropriate permissions
|
||||
RUN mkdir -p plugins db data logs && \
|
||||
chown -R gameyfin:gameyfin .
|
||||
|
||||
# Copy entrypoint script and set permissions
|
||||
COPY --chown=gameyfin:gameyfin ./docker/entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
# Copy application jar (not ending with -plain.jar)
|
||||
COPY --chown=gameyfin:gameyfin ./app/build/libs/ /tmp/app-libs/
|
||||
RUN find /tmp/app-libs -type f -name "*.jar" ! -name "*-plain.jar" -exec cp {} /opt/gameyfin/gameyfin.jar \; && \
|
||||
RUN find /tmp/app-libs -type f -name "*.jar" ! -name "*-plain.jar" -exec cp {} gameyfin.jar \; && \
|
||||
rm -rf /tmp/app-libs
|
||||
|
||||
# Copy all plugin jars
|
||||
COPY --chown=gameyfin:gameyfin ./plugins/ /tmp/plugins/
|
||||
RUN mkdir -p /opt/gameyfin/plugins && \
|
||||
find /tmp/plugins -type f -path "*/build/libs/*.jar" -exec cp {} /opt/gameyfin/plugins/ \; && \
|
||||
RUN find /tmp/plugins -type f -path "*/build/libs/*.jar" -exec cp {} plugins/ \; && \
|
||||
rm -rf /tmp/plugins
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["java", "-jar", "gameyfin.jar"]
|
||||
ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [ -n "$PUID" ] && [ -n "$PGID" ]; then
|
||||
groupmod -o -g "$PGID" gameyfin
|
||||
usermod -o -u "$PUID" gameyfin
|
||||
chown -R gameyfin:gameyfin /opt/gameyfin
|
||||
exec su-exec gameyfin:gameyfin java -jar gameyfin.jar
|
||||
else
|
||||
exec su-exec gameyfin:gameyfin java -jar gameyfin.jar
|
||||
fi
|
||||
@@ -0,0 +1,3 @@
|
||||
1. Run production build
|
||||
2. Run docker build in root dir: docker buildx build --platform linux/arm64/v8,linux/amd64 -f docker/Dockerfile --tag grimsi/gameyfin:<TAG> .
|
||||
2.1 If you want to push the image to a registry, add --push to the command above.
|
||||
Reference in New Issue
Block a user