diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c57b276 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,24 @@ +# Ignore Python cache files +__pycache__/ +*.pyc +*.pyo +*.pyd + +# Ignore pytest cache +.pytest_cache/ + +# Ignore virtual environments +env/ +venv/ + +# Ignore Git repo +.git/ +.gitignore + +# Ignore Docker-related stuff +Dockerfile +docker-compose.yml + +# Ignore MacOS system files +*.DS_Store + diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 0000000..282891d --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,13 @@ +FROM python:3.11-slim + +WORKDIR /app + +COPY requirements.txt . +COPY backend/ /app/backend + +RUN pip install --no-cache-dir -r requirements.txt + +WORKDIR /app/backend + +CMD ["uvicorn", "main:app", "--reload"] + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..9dc6c4d --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +version: "3.8" + +services: + backend: + build: + context: . + dockerfile: backend/Dockerfile + ports: + - "8000:8000" + + frontend: + build: ./frontend + ports: + - "3000:3000" + depends_on: + - backend diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 0000000..b18e839 --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,11 @@ +FROM node:latest + +WORKDIR /root + +COPY package*.json ./ + +RUN npm install + +COPY . . + +CMD ["npm", "start"] \ No newline at end of file