-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (25 loc) · 813 Bytes
/
Dockerfile
File metadata and controls
35 lines (25 loc) · 813 Bytes
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
FROM python:3.10-slim
# Set working directory to match your local setup
WORKDIR /app/backend
# Copy requirements first for better caching
COPY backend/requirements.txt .
RUN pip install -r requirements.txt
# Copy backend code
COPY backend/ .
# Copy frontend build
COPY frontend/build/ /app/frontend/build/
# Create data directory
RUN mkdir -p /app/data && chmod 777 /app/data
# Create startup script that matches your working solution
RUN echo '#!/bin/bash\n\
cd /app/backend\n\
echo "Starting HetznerDock..."\n\
echo "Admin user: $ADMIN_USERNAME"\n\
python3 -m uvicorn app.main:app --host 0.0.0.0 --port 8000\n' > /app/start.sh
RUN chmod +x /app/start.sh
# Set environment variables
ENV DATABASE_URL=sqlite:///../../data/app.db
# Expose the port
EXPOSE 8000
# Run the application
CMD ["/app/start.sh"]