majorly overhauled the design to now use docker-compose and postgres

This commit is contained in:
2026-02-20 02:02:23 +01:00
parent 9769f509a7
commit 7308ad541d
18 changed files with 633 additions and 256 deletions

41
app/Dockerfile Normal file
View File

@@ -0,0 +1,41 @@
# ==========================================
# Stage 1: Build the CSS using Node.js
# ==========================================
FROM node:20-slim AS css-builder
WORKDIR /build
# Copy package files and install dependencies
COPY package*.json ./
RUN npm install
# Copy your source code (needed if your CSS framework scans HTML/JS for classes, like Tailwind)
COPY . .
# Run your build script
RUN npm run build:css
# ==========================================
# Stage 2: Final Python Image
# ==========================================
FROM python:3.13-slim
WORKDIR /src
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the entire project from your host machine
COPY . ./app/
# Overwrite the empty CSS directory with the compiled CSS from Stage 1
# IMPORTANT: Change the paths below to match where your CSS actually gets generated!
# Example: COPY --from=css-builder /build/static/css/style.css ./app/static/css/style.css
COPY --from=css-builder /build/static/css/output.css ./app/static/css/output.css
# Expose Gunicorn port
EXPOSE 5000
# Gunicorn command
CMD ["gunicorn", "--preload", "-w", "4", "-b", "0.0.0.0:5000", "app:create_app()"]