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 \
|
pkg-config \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY requirements.txt constraints.txt .
|
COPY requirements.txt constraints.txt ./
|
||||||
|
|
||||||
RUN PIP_CONSTRAINT=/app/constraints.txt \
|
RUN PIP_CONSTRAINT=/app/constraints.txt \
|
||||||
pip install \
|
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:
|
services:
|
||||||
db:
|
db:
|
||||||
image: docker.iranserver.com/mysql:8
|
image: mirror-docker.runflare.com/library/mysql:8
|
||||||
container_name: ai-db
|
container_name: ai-db
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
@@ -19,14 +19,14 @@ services:
|
|||||||
- crop_network
|
- crop_network
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: docker.iranserver.com/redis
|
image: mirror-docker.runflare.com/library/redis:latest
|
||||||
container_name: ai-redis
|
container_name: ai-redis
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- crop_network
|
- crop_network
|
||||||
|
|
||||||
qdrant:
|
qdrant:
|
||||||
image: docker.iranserver.com/qdrant/qdrant:latest
|
image: mirror-docker.runflare.com/qdrant/qdrant:latest
|
||||||
container_name: ai-qdrant
|
container_name: ai-qdrant
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
@@ -37,7 +37,7 @@ services:
|
|||||||
web:
|
web:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile.Dev
|
||||||
container_name: ai-web
|
container_name: ai-web
|
||||||
restart: always
|
restart: always
|
||||||
command: gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 4 --threads 2
|
command: gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 4 --threads 2
|
||||||
@@ -68,6 +68,7 @@ services:
|
|||||||
celery:
|
celery:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
dockerfile: Dockerfile.Dev
|
||||||
container_name: ai-celery
|
container_name: ai-celery
|
||||||
restart: always
|
restart: always
|
||||||
command: celery -A config worker -l info --concurrency=4
|
command: celery -A config worker -l info --concurrency=4
|
||||||
|
|||||||
Reference in New Issue
Block a user