docker compose

This commit is contained in:
Irwan Cahyono 2025-06-30 13:23:50 +07:00
parent 81a1886ccc
commit 8c9e27662e
2 changed files with 3 additions and 3 deletions

View File

@ -18,10 +18,10 @@ COPY requirements.txt /app/
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy project
COPY /freekake_api/ /app/
COPY . /app/
# Run migrations & collect static in production (optional)
# CMD ["python", "manage.py", "migrate"] && ["python", "manage.py", "collectstatic", "--noinput"]
# Command to run the server
# CMD ["gunicorn", "freekake_api.wsgi:application", "--bind", "0.0.0.0:8000"]
CMD ["gunicorn", "freekake_api.wsgi:application", "--bind", "0.0.0.0:8000"]

View File

@ -5,7 +5,7 @@ services:
context: .
dockerfile: ./Dockerfile
# command: gunicorn freekake_api.wsgi:application --bind 0.0.0.0:8000
command: sh -c "gunicorn freekake_api.wsgi:application --bind 0.0.0.0:8000"
# command: sh -c "gunicorn freekake_api.wsgi:application --bind 0.0.0.0:8000"
volumes:
- .:/app
- static_volume:/app/static