Explorar el Código

修改配置文件

mengqiankang hace 1 mes
padre
commit
4741df21f1
Se han modificado 2 ficheros con 10 adiciones y 8 borrados
  1. 5 4
      alien_gateway/Dockerfile
  2. 5 4
      alien_store/Dockerfile

+ 5 - 4
alien_gateway/Dockerfile

@@ -6,15 +6,16 @@ ENV POETRY_VIRTUALENVS_CREATE=false \
     PYTHONUNBUFFERED=1 \
     PYTHONDONTWRITEBYTECODE=1
 
-RUN python -m pip install --upgrade pip \
-    && pip install --no-cache-dir -i https://pypi.org/simple poetry
+RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple \
+    && pip install --no-cache-dir poetry
 
 COPY pyproject.toml poetry.lock ./
 
-RUN poetry install --no-root --no-interaction --no-ansi
+RUN poetry source add --priority=primary tsinghua https://pypi.tuna.tsinghua.edu.cn/simple || true \
+    && poetry install --no-root --no-interaction --no-ansi
 
 COPY . .
 
 EXPOSE 33333
 
-CMD ["uvicorn", "alien_store.main:app", "--host", "0.0.0.0", "--port", "33333"]
+CMD ["uvicorn", "alien_gateway.main:app", "--host", "0.0.0.0", "--port", "33333"]

+ 5 - 4
alien_store/Dockerfile

@@ -6,15 +6,16 @@ ENV POETRY_VIRTUALENVS_CREATE=false \
     PYTHONUNBUFFERED=1 \
     PYTHONDONTWRITEBYTECODE=1
 
-RUN python -m pip install --upgrade pip \
-    && pip install --no-cache-dir -i https://pypi.org/simple poetry
+RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple \
+    && pip install --no-cache-dir poetry
 
 COPY pyproject.toml poetry.lock ./
 
-RUN poetry install --no-root --no-interaction --no-ansi
+RUN poetry source add --priority=primary tsinghua https://pypi.tuna.tsinghua.edu.cn/simple || true \
+    && poetry install --no-root --no-interaction --no-ansi
 
 COPY . .
 
 EXPOSE 38001
 
-CMD ["uvicorn", "alien_store.main:app", "--host", "0.0.0.0", "--port", "38001"]
+CMD ["uvicorn", "alien_store.main:app", "--host", "0.0.0.0", "--port", "38001"]