diff --git a/next/public/locales/en/chat.missing.json b/next/public/locales/en/chat.missing.json index 12a3d7debf..8f69a5f58f 100644 --- a/next/public/locales/en/chat.missing.json +++ b/next/public/locales/en/chat.missing.json @@ -6,4 +6,4 @@ "👉 创建一个代理,添加名称和目标,然后单击\"启动代理!\"按钮": "👉 创建一个代理,添加名称和目标,然后单击\"启动代理!\"按钮", "👉 創建一個AI機器人,輸入名稱和目標,然後點擊\"啟動AI!\"按鈕": "👉 創建一個AI機器人,輸入名稱和目標,然後點擊\"啟動AI!\"按鈕", "👉 Erstellen Sie einen Agenten, indem Sie einen Namen/Ziel hinzufügen und auf Bereitstellen klicken!": "👉 Erstellen Sie einen Agenten, indem Sie einen Namen/Ziel hinzufügen und auf Bereitstellen klicken!" -} +} \ No newline at end of file diff --git a/platform/Dockerfile b/platform/Dockerfile index 5c4cf52a1c..668ee5f38d 100644 --- a/platform/Dockerfile +++ b/platform/Dockerfile @@ -1,10 +1,10 @@ FROM python:3.11-slim-buster as prod + RUN apt-get update && apt-get install -y \ default-libmysqlclient-dev \ gcc \ && rm -rf /var/lib/apt/lists/* - RUN pip install poetry==1.4.2 # Configuring poetry @@ -21,10 +21,20 @@ RUN apt-get purge -y \ gcc \ && rm -rf /var/lib/apt/lists/* -# Copying actuall application +# Copying actual application COPY . /app/src/ RUN poetry install --only main + + +# Ensure correct line endings after these files are edited by windows +RUN chmod +x /app/src/entrypoint.sh +RUN apt-get update && apt-get install -y netcat-openbsd dos2unix \ + && dos2unix /app/src/entrypoint.sh \ + && apt-get clean && rm -rf /var/lib/apt/lists/* +ENTRYPOINT ["sh", "entrypoint.sh"] + + CMD ["/usr/local/bin/python", "-m", "reworkd_platform"] FROM prod as dev diff --git a/platform/entrypoint.sh b/platform/entrypoint.sh new file mode 100644 index 0000000000..3e8b23ee28 --- /dev/null +++ b/platform/entrypoint.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +host=db +port=3306 + +until echo "SELECT 1;" | nc "$host" "$port" > /dev/null 2>&1; do + >&2 echo "Database is unavailable - Sleeping..." + sleep 2 +done + +>&2 echo "Database is available! Continuing..." + +# Run cmd +exec "$@"