diff options
| author | shihaoyue <[email protected]> | 2024-10-11 15:57:42 +0800 |
|---|---|---|
| committer | shihaoyue <[email protected]> | 2024-10-11 15:57:42 +0800 |
| commit | b76091e30545adbe54b01d4d4114b6c62e285f63 (patch) | |
| tree | bf640afce3a5763294ecb1e49c9a89ae28b9eb8c | |
| parent | 93e417654c3f71d2345054c90f9994b3ef8798d6 (diff) | |
add docker deploy
| -rw-r--r-- | docker-compose.yml | 11 | ||||
| -rw-r--r-- | server/Dockerfile | 12 |
2 files changed, 23 insertions, 0 deletions
diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8901c44 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3'
+
+services:
+ server:
+ build: .
+ ports:
+ - "12526:12526"
+ volumes:
+ - ./server:/app # ����ǰĿ¼���ص������е� /app Ŀ¼
+ environment:
+ FLASK_ENV: development # ���ÿ���ģʽ
diff --git a/server/Dockerfile b/server/Dockerfile new file mode 100644 index 0000000..de6690e --- /dev/null +++ b/server/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.10-slim
+
+WORKDIR /app
+
+COPY requirements.txt .
+
+# ʹ�ù���Դ��װ����
+RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
+
+COPY . .
+
+CMD ["python", "app.py"]
|
