فهرست منبع

docker images

tanlie 3 روز پیش
والد
کامیت
f4c42211c1
2فایلهای تغییر یافته به همراه5 افزوده شده و 30 حذف شده
  1. 2 14
      Dockerfile
  2. 3 16
      docker-compose.yaml

+ 2 - 14
Dockerfile

@@ -1,20 +1,8 @@
-FROM python:3.12-slim
+FROM tanlie/python:3.12-slim
 
 WORKDIR /app
 COPY requirements.txt ./
 
-RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \
-    pip config set global.trusted-host pypi.tuna.tsinghua.edu.cn
-
-RUN apt-get update && \
-    apt-get install -y --no-install-recommends \
-        build-essential \
-        python3-dev \
-        libxml2-dev \
-        libssl-dev \
-        zlib1g-dev && \
-    rm -rf /var/lib/apt/lists/*
-
 RUN python -m pip install --upgrade pip setuptools wheel \
     && python -m pip install --no-cache-dir -r requirements.txt
 
@@ -22,4 +10,4 @@ COPY . .
 
 EXPOSE 5000
 
-CMD ["uwsgi", "--ini", "/app/uwsgi.ini"]
+CMD ["uwsgi", "--ini", "/app/uwsgi.ini"]

+ 3 - 16
docker-compose.yaml

@@ -1,21 +1,8 @@
 services:
-  web:
-    build:
-      context: .
-      dockerfile: Dockerfile
-    working_dir: /app
+  ginger-service:
+    image: ginger:latest
+    container_name: ginger
     command: ["uwsgi", "--ini", "/app/uwsgi.ini"]
-    environment:
-      FLASK_ENV: production
-      SECRET_KEY: ${SECRET_KEY:-change-me}
-      MYSQL_HOST: ${MYSQL_HOST:-host.docker.internal}
-      MYSQL_PORT: ${MYSQL_PORT:-3306}
-      MYSQL_USER: ${MYSQL_USER:-root}
-      MYSQL_PASSWORD: ${MYSQL_PASSWORD:-@@qinys12346..}
-      MYSQL_DB: ${MYSQL_DB:-flask}
-      MYSQL_CHARSET: utf8mb4
-    extra_hosts:
-      - "host.docker.internal:host-gateway"
     ports:
       - "5000:5000"
     restart: unless-stopped