mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-04-19 19:21:18 +00:00
digital ocean update
This commit is contained in:
parent
15b9f99c2e
commit
c7158ab969
@ -3,7 +3,7 @@ spec:
|
||||
services:
|
||||
- name: stirling-pdf
|
||||
git:
|
||||
branch: deployScripts
|
||||
branch: digitalOcean
|
||||
repo_clone_url: https://github.com/Frooodle/Stirling-PDF.git
|
||||
dockerfile_path: Dockerfile2
|
||||
envs:
|
||||
|
51
Dockerfile2
51
Dockerfile2
@ -11,27 +11,54 @@ WORKDIR /downloader
|
||||
RUN curl -s https://api.github.com/repos/Frooodle/Stirling-PDF/releases/latest \
|
||||
| jq -r ".assets[] | select(.name == \"Stirling-PDF.jar\") | .browser_download_url" \
|
||||
| xargs curl -L -o Stirling-PDF.jar
|
||||
|
||||
|
||||
# Use the base image
|
||||
FROM frooodle/stirling-pdf-base:version8
|
||||
|
||||
ARG VERSION_TAG
|
||||
|
||||
# Production stage
|
||||
FROM frooodle/stirling-pdf-base:beta4
|
||||
|
||||
# Set Environment Variables
|
||||
ENV DOCKER_ENABLE_SECURITY=false \
|
||||
HOME=/home/stirlingpdfuser \
|
||||
VERSION_TAG=$VERSION_TAG
|
||||
# PUID=1000 \
|
||||
# PGID=1000 \
|
||||
# UMASK=022 \
|
||||
|
||||
|
||||
# Create scripts folder and copy local scripts
|
||||
RUN mkdir /scripts
|
||||
# Create user and group
|
||||
##RUN groupadd -g $PGID stirlingpdfgroup && \
|
||||
## useradd -u $PUID -g stirlingpdfgroup -s /bin/sh stirlingpdfuser && \
|
||||
## mkdir -p $HOME && chown stirlingpdfuser:stirlingpdfgroup $HOME
|
||||
|
||||
# Set up necessary directories and permissions
|
||||
RUN mkdir -p /scripts /usr/share/fonts/opentype/noto /usr/share/tesseract-ocr /configs /customFiles
|
||||
##&& \
|
||||
## chown -R stirlingpdfuser:stirlingpdfgroup /scripts /usr/share/fonts/opentype/noto /usr/share/tesseract-ocr /configs /customFiles && \
|
||||
## chown -R stirlingpdfuser:stirlingpdfgroup /usr/share/tesseract-ocr-original
|
||||
|
||||
# Copy necessary files
|
||||
COPY ./scripts/* /scripts/
|
||||
|
||||
# Install fonts
|
||||
RUN mkdir /usr/share/fonts/opentype/noto/
|
||||
COPY src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto/
|
||||
RUN fc-cache -f -v
|
||||
COPY src/main/resources/static/fonts/*.otf /usr/share/fonts/opentype/noto/
|
||||
|
||||
# Copy the application JAR file from the download stage
|
||||
COPY --from=downloader /downloader/Stirling-PDF.jar /app.jar
|
||||
COPY --from=downloader /downloader/*.jar /app.jar
|
||||
|
||||
# Expose the application port
|
||||
# Set font cache and permissions
|
||||
RUN fc-cache -f -v && chmod +x /scripts/*
|
||||
|
||||
##&& \
|
||||
## chown stirlingpdfuser:stirlingpdfgroup /app.jar && \
|
||||
## chmod +x /scripts/init.sh
|
||||
|
||||
# Expose necessary ports
|
||||
EXPOSE 8080
|
||||
|
||||
# Run the application
|
||||
RUN chmod +x /scripts/init.sh
|
||||
# Set user and run command
|
||||
##USER stirlingpdfuser
|
||||
ENTRYPOINT ["/scripts/init.sh"]
|
||||
CMD ["java", "-jar", "/app.jar"]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user