forked from jdahlee/Three-Good-Things
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
executable file
·47 lines (36 loc) · 1.25 KB
/
dockerfile
File metadata and controls
executable file
·47 lines (36 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Use an official Python runtime as the base image
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Install system dependencies including Node.js and npm
RUN apt-get update && apt-get install -y \
nodejs \
npm \
curl \
supervisor \
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install -y nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Copy backend requirements and install Python dependencies
COPY backend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy frontend package.json and install Node dependencies
COPY frontend/package*.json ./frontend/
WORKDIR /app/frontend
# Install frontend dependencies (Vite will handle Tailwind installation)
RUN npm install
# Copy frontend files
COPY frontend/ ./
# Build React frontend (when needed)
# RUN npm run build
# Copy backend code
WORKDIR /app
COPY backend/ ./backend/
# Create supervisor configuration
RUN mkdir -p /etc/supervisor/conf.d/
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Expose ports for both servers
EXPOSE 5000 5173
# Start both servers using supervisor
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]