mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-02-03 01:28:39 +08:00
apphub image
This commit is contained in:
parent
9a4fb6941f
commit
73cda97648
@ -1,9 +1,7 @@
|
|||||||
fastapi==0.98.0
|
fastapi
|
||||||
uvicorn
|
uvicorn
|
||||||
rq
|
|
||||||
apscheduler
|
|
||||||
docker
|
|
||||||
psutil
|
|
||||||
gunicorn
|
|
||||||
python-dotenv
|
|
||||||
keyring
|
keyring
|
||||||
|
requests
|
||||||
|
git
|
||||||
|
GitPython
|
||||||
|
PyJWT
|
@ -1,16 +1,14 @@
|
|||||||
FROM python:3.10-slim
|
FROM python:3.10-slim
|
||||||
LABEL maintainer="Websoft9<help@websoft9.com>"
|
LABEL maintainer="Websoft9<help@websoft9.com>"
|
||||||
LABEL version="0.8.19"
|
LABEL version="0.0.1"
|
||||||
|
|
||||||
# Create API Directory
|
# Create API Directory
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr
|
||||||
|
|
||||||
# Copy source and install pip dpendencies
|
# Copy source and install pip dpendencies
|
||||||
COPY api ./api
|
COPY ../../appmanage_new/src /usr
|
||||||
COPY static ./static
|
COPY ../../appmanage_new/requirements.txt /usr
|
||||||
COPY requirements.txt main.py hostname.py ./
|
|
||||||
RUN mkdir /usr/src/app/db
|
|
||||||
COPY database.sqlite /usr/src/app/db/
|
|
||||||
RUN apt update
|
RUN apt update
|
||||||
|
|
||||||
# Install supervisord
|
# Install supervisord
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
# start by supervisord
|
# start by supervisord
|
||||||
internal_ip=$(ip addr show eth0 | awk '/inet /{split($2, a, "/"); print a[1]}')
|
internal_ip=$(ip addr show eth0 | awk '/inet /{split($2, a, "/"); print a[1]}')
|
||||||
nsenter -m -u -i -n -p -t 1 sh -c "sed -i '/websoft9-appmanage/d' /etc/hosts"
|
nsenter -m -u -i -n -p -t 1 sh -c "sed -i '/websoft9-apphub/d' /etc/hosts"
|
||||||
nsenter -m -u -i -n -p -t 1 sh -c "echo $internal_ip websoft9-appmanage>> /etc/hosts"
|
nsenter -m -u -i -n -p -t 1 sh -c "echo $internal_ip websoft9-apphub>> /etc/hosts"
|
||||||
/usr/bin/supervisord
|
/usr/bin/supervisord
|
||||||
supervisorctl start all
|
supervisorctl start all
|
||||||
tail -f /dev/null
|
tail -f /dev/null
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[supervisord]
|
[supervisord]
|
||||||
nodaemon=false
|
nodaemon=false
|
||||||
|
uvicorn app.main:app --reload --port 8080
|
||||||
[program:appmanage]
|
[program:appmanage]
|
||||||
command=uvicorn main:get_app --host 0.0.0.0 --port 5000 --log-level info
|
command=uvicorn main:get_app --host 0.0.0.0 --port 5000 --log-level info
|
||||||
autostart=true
|
autostart=true
|
||||||
|
Loading…
Reference in New Issue
Block a user