omnisealbench / Dockerfile
Mark Duppenthaler
Initial boilerplate for flask server running react frontend on typescript, tailwind, daisyui
f762ee5
raw
history blame
701 Bytes
FROM node:18-alpine AS frontend-build
WORKDIR /app/frontend
COPY frontend/package.json frontend/package-lock.json* ./
RUN npm install
COPY frontend/ ./
RUN npm run build
FROM python:3.9-slim
WORKDIR /app/backend
# Copy frontend build
COPY --from=frontend-build /app/frontend/dist /app/frontend/dist
# Copy and install backend requirements
COPY backend/ .
RUN pip install --no-cache-dir -r requirements.txt
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV FLASK_APP=backend/app.py
ENV FLASK_ENV=development
# Expose the port the app will run on
EXPOSE 7860
WORKDIR /app
# Command to run the application
CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]