From 95515754cccbd59f3d60a0aef54f7bbf6df9debe Mon Sep 17 00:00:00 2001 From: Kai Date: Mon, 24 Mar 2025 13:58:19 +0800 Subject: [PATCH] chore: update .dockerignore to include Pipfile and Pipfile.lock, add cryptography to requirements.txt, and modify compose-test.yaml for port mapping and volume path --- .dockerignore | 1 - deploy/compose-test.yaml | 8 ++++---- requirements.txt | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.dockerignore b/.dockerignore index 79934de..9266784 100644 --- a/.dockerignore +++ b/.dockerignore @@ -15,7 +15,6 @@ __pycache__/ .gitignore # 忽略依赖文件(除非你希望它们存在于镜像中) -requirements.txt Pipfile Pipfile.lock diff --git a/deploy/compose-test.yaml b/deploy/compose-test.yaml index 19d7d42..63acfb1 100644 --- a/deploy/compose-test.yaml +++ b/deploy/compose-test.yaml @@ -1,9 +1,9 @@ -version: '3' - services: my-django: - image: gitea.xkkxyy.com/Kai/my-django:latest + image: my-django:latest command: ["uvicorn", "mysite.asgi:application", "--host=0.0.0.0", "--port=80", "--reload"] + ports: + - 8080:80 deploy: mode: replicated replicas: 1 @@ -11,4 +11,4 @@ services: env: test restart: unless-stopped volumes: - - /opt/docker/data:/tmp/data + - ../../my-django:/opt/my-django diff --git a/requirements.txt b/requirements.txt index 3b5d5e1..df32ccb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ uvicorn +cryptography Django~=5.1.5 djangorestframework~=3.15.2 django-filter~=25.1