Compare commits
No commits in common. "9ca7f43fdc598ffde3919e96397ab92620bb465e" and "9f7d2ebe430b31facb49fa442fb2e25cd540f349" have entirely different histories.
9ca7f43fdc
...
9f7d2ebe43
13
Nixpacks.toml
Normal file
13
Nixpacks.toml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[phases.setup]
|
||||||
|
cmds = [
|
||||||
|
"pip install -r requirements.txt",
|
||||||
|
]
|
||||||
|
|
||||||
|
[phases.build]
|
||||||
|
cmds = [
|
||||||
|
"python manage.py collectstatic --noinput",
|
||||||
|
"python manage.py migrate",
|
||||||
|
]
|
||||||
|
|
||||||
|
[start]
|
||||||
|
cmd = "gunicorn booking_system.wsgi:application --bind 0.0.0.0:$PORT"
|
||||||
30
dockerfile
30
dockerfile
@ -1,30 +0,0 @@
|
|||||||
FROM python:3.11-slim
|
|
||||||
|
|
||||||
# Set environment variables
|
|
||||||
ENV PYTHONDONTWRITEBYTECODE 1
|
|
||||||
ENV PYTHONUNBUFFERED 1
|
|
||||||
|
|
||||||
# Set work directory
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# Install system dependencies
|
|
||||||
RUN apt-get update && apt-get install -y \
|
|
||||||
gcc \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Copy requirements and install Python dependencies
|
|
||||||
COPY requirements.txt .
|
|
||||||
RUN pip install --no-cache-dir --upgrade pip
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
|
||||||
|
|
||||||
# Copy project
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# Collect static files
|
|
||||||
RUN python manage.py collectstatic --noinput
|
|
||||||
|
|
||||||
# Expose port
|
|
||||||
EXPOSE 8000
|
|
||||||
|
|
||||||
# Run migrations and start Gunicorn
|
|
||||||
CMD sh -c "python manage.py migrate && gunicorn booking_system.wsgi:application --bind 0.0.0.0:8000 --workers 3"
|
|
||||||
Loading…
Reference in New Issue
Block a user