diff --git a/api/Dockerfile b/api/Dockerfile new file mode 100644 index 00000000..8ac49ada --- /dev/null +++ b/api/Dockerfile @@ -0,0 +1,20 @@ +# Use the official Python image from the Docker Hub +FROM python:3.9-slim + +# Set the working directory in the container +WORKDIR /app + +# Copy the requirements file into the container +COPY api/requirements.txt . + +# Install the dependencies +RUN pip install --no-cache-dir -r requirements.txt + +# Copy the rest of the application code into the container + +COPY api/ . + +# Command to run the FastAPI server + +CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] + diff --git a/front-end-nextjs/Dockerfile b/front-end-nextjs/Dockerfile new file mode 100644 index 00000000..bb3b5e05 --- /dev/null +++ b/front-end-nextjs/Dockerfile @@ -0,0 +1,32 @@ +# Use the official Node.js image from the Docker Hub + +FROM node:16-alpine + +# Set the working directory in the container + +WORKDIR /app + +# Copy the package.json and package-lock.json files + +COPY frontend/package*.json ./ + +# Install the dependencies + +RUN npm install + +# Copy the rest of the application code into the container + +COPY frontend/ . + +# Build the Next.js application + +RUN npm run build + +# Expose port 3000 to the outside world + +EXPOSE 3000 + +# Command to run the Next.js server + +CMD ["npm", "start"] +