This commit is contained in:
qiaofeng1227 2023-05-19 17:43:13 +08:00
parent 4ba213a164
commit d5ac1ef172
4 changed files with 17 additions and 16 deletions

View file

@ -10,7 +10,7 @@ COPY static ./static
COPY requirements.txt main.py ./ COPY requirements.txt main.py ./
RUN apt update RUN apt update
# Install supervisords # Install supervisord
RUN apt install -y supervisor RUN apt install -y supervisor
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY config/cmd.sh /cmd.sh COPY config/cmd.sh /cmd.sh

View file

@ -3,18 +3,18 @@ from api.model.config import Config
from api.model.status_reason import StatusReason from api.model.status_reason import StatusReason
class App(BaseModel): class App(BaseModel):
app_id: str app_id: None
app_name: str app_name: None
customer_name: str customer_name: None
trade_mark: str trade_mark: None
status: str status: None
status_reason: StatusReason = None status_reason: StatusReason = None
official_app: bool official_app: bool
app_version: str app_version: None
create_time: str create_time: None
volume_data = [] volume_data = []
config_path = str config_path = None
image_url: str image_url: None
app_https: bool app_https: bool
app_replace_url: bool app_replace_url: bool
config: Config = None config: Config = None

View file

@ -2,9 +2,9 @@ from pydantic import BaseModel
class Config(BaseModel): class Config(BaseModel):
port: int port: int
compose_file: str compose_file: None
url: str url: None
admin_url: str admin_url: None
admin_username: str admin_username: None
admin_password: str admin_password: None
default_domain: str default_domain: None

View file

@ -408,6 +408,7 @@ def get_apps_from_compose():
if status in ['running', 'exited']: if status in ['running', 'exited']:
myLogger.info_logger("config set ok") myLogger.info_logger("config set ok")
myLogger.info_logger(default_domain) myLogger.info_logger(default_domain)
config = Config(port=port, compose_file=volume, url=url, admin_url=admin_url, config = Config(port=port, compose_file=volume, url=url, admin_url=admin_url,
admin_username=user_name, admin_password=password, default_domain=default_domain) admin_username=user_name, admin_password=password, default_domain=default_domain)
else: else: