feat: add dockerfiles & change yml
This commit is contained in:
parent
a3b9ce9985
commit
ef99f5de39
9
Dockerfile
Normal file
9
Dockerfile
Normal 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/*
|
@ -10,6 +10,38 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- qdrant_data:/qdrant/storage
|
- qdrant_data:/qdrant/storage
|
||||||
restart: unless-stopped
|
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:
|
volumes:
|
||||||
qdrant_data:
|
qdrant_data:
|
4
futa-clone/Dockerfile.frontend
Normal file
4
futa-clone/Dockerfile.frontend
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Dockerfile.frontend
|
||||||
|
FROM node:18-alpine
|
||||||
|
|
||||||
|
RUN apk add --no-cache git
|
Loading…
x
Reference in New Issue
Block a user