feat: add dockerfiles & change yml

This commit is contained in:
KofK 2025-02-12 12:19:45 +03:00
parent a3b9ce9985
commit ef99f5de39
3 changed files with 45 additions and 0 deletions

9
Dockerfile Normal file
View File

@ -0,0 +1,9 @@
# Dockerfile
FROM python:3.9-slim
ENV PYTHONUNBUFFERED 1
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
python3-dev \
&& rm -rf /var/lib/apt/lists/*

View File

@ -10,6 +10,38 @@ services:
volumes:
- qdrant_data:/qdrant/storage
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "--fail", "http://qdrant:6333"]
interval: 30s
timeout: 10s
retries: 3
app:
build: .
container_name: backend
ports:
- "8000:8000"
volumes:
- .:/app
working_dir: /app
depends_on:
qdrant:
condition: service_healthy
command: sh -c "pip install -r requirements.txt && uvicorn main:app --host 0.0.0.0 --port 8000 --reload"
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
container_name: frontend
ports:
- "3000:3000"
volumes:
- ./futa-clone:/app
working_dir: /app
depends_on:
- qdrant
command: sh -c "npm install && npm run start"
volumes:
qdrant_data:

View File

@ -0,0 +1,4 @@
# Dockerfile.frontend
FROM node:18-alpine
RUN apk add --no-cache git