websoft9/docker/w9apphub/Dockerfile

45 lines
1.3 KiB
Docker
Raw Normal View History

2023-09-19 12:54:20 +08:00
# python:3.10-bullseye
# RUN apt update & apt install wget git curl unzip
FROM python:3.10-bullseye
2023-02-21 14:21:53 +08:00
LABEL maintainer="Websoft9<help@websoft9.com>"
2023-09-19 12:54:20 +08:00
LABEL version="0.8.17"
2023-03-24 15:32:38 +08:00
2023-02-21 14:21:53 +08:00
2023-09-19 12:54:20 +08:00
ENV LIBRARY_VERSION=v0.5.4
2023-09-18 17:13:15 +08:00
WORKDIR /usr/websoft9
2023-09-18 10:52:08 +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 && \
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
2023-09-18 17:13:15 +08:00
# Copy source and install pip dpendencies
# Todo: add virtualenv for Python install
2023-09-19 12:54:20 +08:00
#COPY ../../appmanage_new ./apphub
#RUN pip install -r apphub/requirements.txt
2023-04-06 13:07:21 +08:00
2023-09-18 17:13:15 +08:00
# supervisor
2023-09-19 12:54:20 +08:00
RUN pip install supervisor
2023-04-04 09:51:08 +08:00
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
2023-09-18 17:13:15 +08:00
RUN chmod +r /etc/supervisor/conf.d/supervisord.conf
2023-09-19 12:54:20 +08:00
2023-09-18 17:13:15 +08:00
COPY config/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
VOLUME /usr/websoft9/apphub/logs
VOLUME /usr/websoft9/apphub/src/conf
VOLUME /usr/websoft9/media
2023-09-19 12:54:20 +08:00
# Clean cache and install files
2023-09-19 09:02:56 +08:00
RUN rm -rf apphub/docs apphub/tests library.zip plugin-appstore
2023-02-21 14:21:53 +08:00
2023-09-18 17:13:15 +08:00
EXPOSE 8080
2023-09-19 12:54:20 +08:00
ENTRYPOINT [/entrypoint.sh]