diff --git a/docker/apphub-dev.yml b/docker/apphub-dev.yml new file mode 100644 index 00000000..3aaa76a1 --- /dev/null +++ b/docker/apphub-dev.yml @@ -0,0 +1,24 @@ +version: "3.8" + +services: + apphub: + image: websoft9dev/apphub:$APPHUB_VERSION + container_name: websoft9-apphub + build: + context: . + dockerfile_inline: | + websoft9dev/apphub:$APPHUB_VERSION + RUN cp -r /websoft9/apphub /websoft9/src + RUN sed -i 's/supervisorctl start apphub/supervisorctl start apphubdev/g' /entrypoint.sh + VOLUME /websoft9/src + ports: + - 9001-9999:8080 + restart: always + volumes: + - /data/mysource:/websoft9/src + - apphub_media:/websoft9/media + - apphub_logs:/websoft9/apphub/logs + depends_on: + - deployment + - git + - proxy \ No newline at end of file diff --git a/docker/apphub/Dockerfile b/docker/apphub/Dockerfile index 5b0e559e..c74c14e6 100644 --- a/docker/apphub/Dockerfile +++ b/docker/apphub/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.10-bullseye AS buildstage LABEL maintainer="Websoft9" -LABEL version="0.0.3" +LABEL version="0.0.4" ENV LIBRARY_VERSION=v0.5.8 diff --git a/docker/apphub/config/entrypoint.sh b/docker/apphub/config/entrypoint.sh index 384fd408..73ec423f 100644 --- a/docker/apphub/config/entrypoint.sh +++ b/docker/apphub/config/entrypoint.sh @@ -29,5 +29,5 @@ set -e # start by supervisord /usr/bin/supervisord -supervisorctl start all +supervisorctl start apphub tail -f /dev/null \ No newline at end of file diff --git a/docker/apphub/config/supervisord.conf b/docker/apphub/config/supervisord.conf index f859ae03..29c718fa 100644 --- a/docker/apphub/config/supervisord.conf +++ b/docker/apphub/config/supervisord.conf @@ -2,6 +2,11 @@ nodaemon=false [program:apphub] +command=uvicorn src.main:app --host 0.0.0.0 --port 8080 --log-level error +autostart=true +directory=/websoft9/apphub + +[program:apphubdev] command=uvicorn src.main:app --reload --host 0.0.0.0 --port 8080 --log-level error autostart=true -directory=/websoft9/apphub \ No newline at end of file +directory=/websoft9/src \ No newline at end of file