mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-23 17:40:35 +08:00
apphub
This commit is contained in:
parent
a91f4112ed
commit
27bfab00fb
@ -1,34 +1,40 @@
|
||||
# python:3.10-bullseye
|
||||
# RUN apt update & apt install wget git curl unzip
|
||||
|
||||
FROM python:3.10-bullseye
|
||||
FROM python:3.10-bullseye AS buildstage
|
||||
LABEL maintainer="Websoft9<help@websoft9.com>"
|
||||
LABEL version="0.8.17"
|
||||
|
||||
|
||||
ENV LIBRARY_VERSION=v0.5.4
|
||||
|
||||
WORKDIR /usr/websoft9
|
||||
|
||||
# Prepare library
|
||||
RUN wget https://github.com/Websoft9/docker-library/archive/refs/tags/$LIBRARY_VERSION.zip -O ./library.zip && \
|
||||
unzip library.zip && \
|
||||
mv docker-library-* library && \
|
||||
mkdir credentials && \
|
||||
echo "This folder stored the credentials of other services that apphub will connect" > credentials/readme && \
|
||||
# Prepare Media and master data from Contentful
|
||||
git clone --depth=1 https://github.com/Websoft9/plugin-appstore && \
|
||||
mv -f plugin-appstore/data ./media
|
||||
mv -f plugin-appstore/data ./media && \
|
||||
git clone --depth=1 https://github.com/Websoft9/websoft9
|
||||
|
||||
# Copy source and install pip dpendencies
|
||||
# Todo: add virtualenv for Python install
|
||||
#COPY ../../appmanage_new ./apphub
|
||||
#RUN pip install -r apphub/requirements.txt
|
||||
|
||||
|
||||
FROM python:3.10-slim-bullseye
|
||||
WORKDIR /websoft9
|
||||
|
||||
COPY --from=buildstage /media/data ./media
|
||||
COPY --from=buildstage /library ./library
|
||||
COPY --from=buildstage /websoft9/appmanage_new ./apphub
|
||||
|
||||
|
||||
RUN mkdir credentials && \
|
||||
echo "This folder stored the credentials of other services that integrated with apphub" > credentials/readme
|
||||
|
||||
RUN pip install -r apphub/requirements.txt
|
||||
|
||||
# supervisor
|
||||
RUN pip install supervisor
|
||||
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
RUN chmod +r /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY config/supervisord.conf /usr/local/supervisord.conf
|
||||
RUN chmod +r /usr/local/supervisord.conf
|
||||
|
||||
|
||||
COPY config/entrypoint.sh /entrypoint.sh
|
||||
@ -42,4 +48,4 @@ VOLUME /usr/websoft9/media
|
||||
RUN rm -rf apphub/docs apphub/tests library.zip plugin-appstore
|
||||
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT [/entrypoint.sh]
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
@ -2,6 +2,6 @@
|
||||
|
||||
# start by supervisord
|
||||
|
||||
/usr/bin/supervisord
|
||||
/usr/local/bin/supervisord
|
||||
supervisorctl start all
|
||||
tail -f /dev/null
|
@ -1,10 +1,12 @@
|
||||
[supervisord]
|
||||
|
||||
nodaemon=false
|
||||
uvicorn app.main:app --reload --port 8080
|
||||
|
||||
[supervisorctl]
|
||||
|
||||
|
||||
[program:apphub]
|
||||
|
||||
command=uvicorn main:get_app --host 0.0.0.0 --port 5000 --log-level info
|
||||
command=uvicorn app.main:app --reload --host 0.0.0.0 --port 8080 --log-level info
|
||||
autostart=true
|
||||
directory=/usr/websoft9/apphub
|
Loading…
Reference in New Issue
Block a user