UPDATE
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
pkg-config \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements.txt constraints.txt .
|
||||
COPY requirements.txt constraints.txt ./
|
||||
|
||||
RUN PIP_CONSTRAINT=/app/constraints.txt \
|
||||
pip install \
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
FROM mirror-docker.runflare.com/library/python:3.10
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Debian mirror configuration
|
||||
RUN rm -f /etc/apt/sources.list /etc/apt/sources.list.d/* && \
|
||||
printf '%s\n' \
|
||||
'deb https://mirror-linux.runflare.com/debian/ bookworm main contrib non-free non-free-firmware' \
|
||||
'deb https://mirror-linux.runflare.com/debian/ bookworm-updates main contrib non-free non-free-firmware' \
|
||||
'deb https://mirror-linux.runflare.com/debian-security/ bookworm-security main contrib non-free non-free-firmware' \
|
||||
'' \
|
||||
> /etc/apt/sources.list
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
default-libmysqlclient-dev \
|
||||
build-essential \
|
||||
pkg-config \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements.txt constraints.txt /app/
|
||||
|
||||
RUN PIP_CONSTRAINT=/app/constraints.txt \
|
||||
pip install \
|
||||
--prefer-binary \
|
||||
--index-url https://mirror-pypi.runflare.com/simple \
|
||||
--trusted-host mirror-pypi.runflare.com \
|
||||
-r requirements.txt
|
||||
|
||||
COPY entrypoint.sh /app/entrypoint.sh
|
||||
COPY . .
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["sh", "/app/entrypoint.sh"]
|
||||
CMD ["gunicorn", "config.wsgi:application", "--bind", "0.0.0.0:8000"]
|
||||
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
db:
|
||||
image: docker.iranserver.com/mysql:8
|
||||
image: mirror-docker.runflare.com/library/mysql:8
|
||||
container_name: ai-db
|
||||
restart: always
|
||||
environment:
|
||||
@@ -19,14 +19,14 @@ services:
|
||||
- crop_network
|
||||
|
||||
redis:
|
||||
image: docker.iranserver.com/redis
|
||||
image: mirror-docker.runflare.com/library/redis:latest
|
||||
container_name: ai-redis
|
||||
restart: always
|
||||
networks:
|
||||
- crop_network
|
||||
|
||||
qdrant:
|
||||
image: docker.iranserver.com/qdrant/qdrant:latest
|
||||
image: mirror-docker.runflare.com/qdrant/qdrant:latest
|
||||
container_name: ai-qdrant
|
||||
restart: always
|
||||
volumes:
|
||||
@@ -37,7 +37,7 @@ services:
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
dockerfile: Dockerfile.Dev
|
||||
container_name: ai-web
|
||||
restart: always
|
||||
command: gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 4 --threads 2
|
||||
@@ -68,6 +68,7 @@ services:
|
||||
celery:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.Dev
|
||||
container_name: ai-celery
|
||||
restart: always
|
||||
command: celery -A config worker -l info --concurrency=4
|
||||
|
||||
Reference in New Issue
Block a user