2023-09-19 14:32:20 +08:00
|
|
|
FROM python:3.10-bullseye AS buildstage
|
2023-02-21 14:21:53 +08:00
|
|
|
LABEL maintainer="Websoft9<help@websoft9.com>"
|
2023-10-11 17:19:38 +08:00
|
|
|
LABEL version="0.0.5"
|
2023-03-24 15:32:38 +08:00
|
|
|
|
2023-09-28 08:49:38 +08:00
|
|
|
ENV LIBRARY_VERSION=v0.5.8
|
2023-09-18 17:13:15 +08:00
|
|
|
|
2023-09-19 12:54:20 +08:00
|
|
|
# Prepare library
|
|
|
|
RUN wget https://github.com/Websoft9/docker-library/archive/refs/tags/$LIBRARY_VERSION.zip -O ./library.zip && \
|
|
|
|
unzip library.zip && \
|
2023-09-19 14:32:20 +08:00
|
|
|
mv docker-library-* library && \
|
2023-09-19 12:54:20 +08:00
|
|
|
mkdir credentials && \
|
|
|
|
echo "This folder stored the credentials of other services that apphub will connect" > credentials/readme && \
|
2023-10-08 15:56:13 +08:00
|
|
|
# Prepare Media and master data from Contentful
|
|
|
|
git clone --depth=1 https://github.com/swagger-api/swagger-ui.git && \
|
|
|
|
wget https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js && \
|
|
|
|
cp redoc.standalone.js swagger-ui/dist && \
|
2023-09-19 12:54:20 +08:00
|
|
|
git clone --depth=1 https://github.com/Websoft9/plugin-appstore && \
|
2023-09-19 14:32:20 +08:00
|
|
|
mv -f plugin-appstore/data ./media && \
|
|
|
|
git clone --depth=1 https://github.com/Websoft9/websoft9
|
|
|
|
|
2023-09-23 14:28:03 +08:00
|
|
|
FROM python:3.10-slim-bullseye
|
2023-09-19 14:32:20 +08:00
|
|
|
WORKDIR /websoft9
|
|
|
|
|
|
|
|
COPY --from=buildstage /media/data ./media
|
|
|
|
COPY --from=buildstage /library ./library
|
2023-10-11 17:19:38 +08:00
|
|
|
COPY --from=buildstage /websoft9/apphub ./apphub
|
2023-10-08 15:56:13 +08:00
|
|
|
COPY --from=buildstage /swagger-ui/dist ./apphub/swagger-ui
|
2023-09-19 14:32:20 +08:00
|
|
|
|
2023-09-26 17:36:50 +08:00
|
|
|
RUN apt update && apt install git jq iproute2 supervisor -y && \
|
2023-09-19 15:40:14 +08:00
|
|
|
mkdir credentials && \
|
2023-09-19 14:32:20 +08:00
|
|
|
echo "This folder stored the credentials of other services that integrated with apphub" > credentials/readme
|
2023-04-06 13:07:21 +08:00
|
|
|
|
2023-09-19 15:40:14 +08:00
|
|
|
RUN pip install --upgrade pip && pip install -r apphub/requirements.txt
|
2023-10-10 18:31:53 +08:00
|
|
|
#RUN cd apphub && pip install .
|
2023-09-18 17:13:15 +08:00
|
|
|
# supervisor
|
2023-09-20 11:23:21 +08:00
|
|
|
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
|
|
RUN chmod +r /etc/supervisor/conf.d/supervisord.conf
|
2023-09-18 17:13:15 +08:00
|
|
|
COPY config/entrypoint.sh /entrypoint.sh
|
|
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
|
2023-09-27 17:03:01 +08:00
|
|
|
VOLUME /websoft9/apphub/logs
|
2023-10-10 08:27:39 +08:00
|
|
|
VOLUME /websoft9/apphub/src/config
|
2023-09-27 17:03:01 +08:00
|
|
|
VOLUME /websoft9/media
|
2023-09-18 17:13:15 +08:00
|
|
|
|
2023-09-19 12:54:20 +08:00
|
|
|
# Clean cache and install files
|
2023-09-20 11:55:22 +08:00
|
|
|
RUN rm -rf apphub/docs apphub/tests library.zip plugin-appstore && \
|
|
|
|
apt clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc /usr/share/doc-base
|
2023-02-21 14:21:53 +08:00
|
|
|
|
2023-09-18 17:13:15 +08:00
|
|
|
EXPOSE 8080
|
2023-09-19 14:32:20 +08:00
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|