Skip to content

Commit

Permalink
Update: Enhanced UI layout & design (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangsonww committed Mar 27, 2024
1 parent fed2a40 commit 8ce23a5
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions utilities/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# ---- Base Node ----
FROM node:14 AS base
WORKDIR /app
COPY package*.json ./

# ---- Dependencies ----
FROM base AS dependencies
RUN npm set progress=false && npm config set depth 0
RUN npm install --only=production
COPY . .
RUN npm run build

# ---- Copy Frontend Artifacts ----
# Separate stage for extracting frontend build artifacts
FROM dependencies AS frontend-artifacts
RUN mkdir -p /app/public
RUN cp -R build/ /app/public/

# ---- Python Base ----
FROM python:3.8 AS python-base
WORKDIR /app
COPY --from=frontend-artifacts /app/public /app/public
COPY backend/requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt

# ---- Copy Backend Code ----
FROM python-base AS backend-code
COPY backend /app

# ---- Release with Gunicorn ----
FROM backend-code AS release
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PATH="/app:${PATH}"

# Expose port for the backend
EXPOSE 8080

# Start Gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "--workers", "3", "--threads", "3", "TheMovieVerseApp.wsgi:application"]

0 comments on commit 8ce23a5

Please sign in to comment.