mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-25 09:00:26 +00:00
apphub image
This commit is contained in:
parent
9a4fb6941f
commit
73cda97648
4 changed files with 14 additions and 18 deletions
|
@ -1,9 +1,7 @@
|
|||
fastapi==0.98.0
|
||||
fastapi
|
||||
uvicorn
|
||||
rq
|
||||
apscheduler
|
||||
docker
|
||||
psutil
|
||||
gunicorn
|
||||
python-dotenv
|
||||
keyring
|
||||
keyring
|
||||
requests
|
||||
git
|
||||
GitPython
|
||||
PyJWT
|
|
@ -1,16 +1,14 @@
|
|||
FROM python:3.10-slim
|
||||
LABEL maintainer="Websoft9<help@websoft9.com>"
|
||||
LABEL version="0.8.19"
|
||||
LABEL version="0.0.1"
|
||||
|
||||
# Create API Directory
|
||||
WORKDIR /usr/src/app
|
||||
WORKDIR /usr
|
||||
|
||||
# Copy source and install pip dpendencies
|
||||
COPY api ./api
|
||||
COPY static ./static
|
||||
COPY requirements.txt main.py hostname.py ./
|
||||
RUN mkdir /usr/src/app/db
|
||||
COPY database.sqlite /usr/src/app/db/
|
||||
COPY ../../appmanage_new/src /usr
|
||||
COPY ../../appmanage_new/requirements.txt /usr
|
||||
|
||||
RUN apt update
|
||||
|
||||
# Install supervisord
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
# start by supervisord
|
||||
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 "echo $internal_ip websoft9-appmanage>> /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-apphub>> /etc/hosts"
|
||||
/usr/bin/supervisord
|
||||
supervisorctl start all
|
||||
tail -f /dev/null
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[supervisord]
|
||||
nodaemon=false
|
||||
|
||||
uvicorn app.main:app --reload --port 8080
|
||||
[program:appmanage]
|
||||
command=uvicorn main:get_app --host 0.0.0.0 --port 5000 --log-level info
|
||||
autostart=true
|
||||
|
|
Loading…
Reference in a new issue