This commit is contained in:
qiaofeng1227 2023-10-10 18:29:23 +08:00
parent 0692696588
commit 0b7561576c
5 changed files with 90 additions and 25 deletions

View File

@ -1,24 +0,0 @@
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

View File

@ -31,6 +31,7 @@ RUN apt update && apt install git jq iproute2 supervisor -y && \
echo "This folder stored the credentials of other services that integrated with apphub" > credentials/readme
RUN pip install --upgrade pip && pip install -r apphub/requirements.txt
RUN cd apphub && pip install .
# supervisor
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
RUN chmod +r /etc/supervisor/conf.d/supervisord.conf
@ -46,5 +47,6 @@ 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
EXPOSE 8080
ENTRYPOINT ["/entrypoint.sh"]

View File

@ -0,0 +1,3 @@
FROM websoft9dev/apphub:0.0.4 as buildstage
RUN mkdir -p /websoft9/src
RUN sed -i 's/supervisorctl start apphub/supervisorctl start apphubdev/g' /entrypoint.sh

View File

@ -7,6 +7,6 @@ autostart=true
directory=/websoft9/apphub
[program:apphubdev]
command=uvicorn src.main:app --reload --host 0.0.0.0 --port 8080 --log-level error
command=/bin/bash -c 'cp -r /websoft9/apphub/* /websoft9/src && uvicorn src.main:app --reload --host 0.0.0.0 --port 8080 --log-level error'
autostart=true
directory=/websoft9/src

View File

@ -0,0 +1,84 @@
version: "3.8"
services:
apphub:
image: websoft9dev/apphub:dev
container_name: websoft9-apphub
build:
context: .
dockerfile: ./apphub/Dockerfiledev
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
deployment:
image: websoft9dev/deployment:$DEPLOYMENT_VERSION
container_name: websoft9-deployment
restart: always
ports:
- 9001-9999:9000
volumes:
- portainer:/data
- /data/compose:/data/compose
- /var/run/docker.sock:/var/run/docker.sock
#- /run/podman/podman.sock:/var/run/docker.sock
labels:
com.docker.compose.w9_http.port: 9000
git:
image: websoft9dev/git:$GIT_VERSION
container_name: websoft9-git
restart: always
volumes:
- gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- 9001-9999:3000
environment:
- INSTALL_LOCK=true
- DISABLE_SSH=true
- RUN_MODE=prod
- HTTP_PORT=3000
- DISABLE_REGISTRATION=false
- REQUIRE_SIGNIN_VIEW=false
labels:
com.docker.compose.w9_http.port: 3000
proxy:
image: websoft9dev/proxy:$PROXY_VERSION
container_name: websoft9-proxy
restart: always
ports:
- "80:80"
- "443:443"
- "9001-9999:81"
volumes:
- nginx_data:/data
- nginx_letsencrypt:/etc/letsencrypt
labels:
com.docker.compose.w9_http.port: 80
com.docker.compose.w9_https.port: 443
com.docker.compose.w9_console.port: 81
networks:
default:
name: websoft9
external: true
volumes:
apphub_logs:
apphub_media:
apphub_config:
portainer:
gitea:
nginx_data:
nginx_letsencrypt: