Skip to content

Commit

Permalink
using pipenv to manage the repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Seriainme committed Jun 22, 2024
1 parent f404ef7 commit b7ef8fb
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
FROM python:3.9-slim
# 更新 apt
RUN apt-get update
RUN apt-get -y install net-tools

# 更新pip
RUN pip install --upgrade pip -i https://pypi.doubanio.com/simple

# 安装pipenv
RUN pip install pipenv -i https://pypi.doubanio.com/simple
WORKDIR /app
RUN pipenv install --system --deploy --ignore-pipfile
COPY . /app

RUN pip install --no-cache-dir -r requirements.txt
ENV PYTHONPATH="/app"
CMD ["python", "spider.py"]
14 changes: 14 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
requests = "==2.31.0"
loguru = "==0.7.2"
pymongo = "==4.6.1"

[dev-packages]

[requires]
python_version = "3.9"
3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

0 comments on commit b7ef8fb

Please sign in to comment.