Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/diazdavilajesus16-stack/Sevicheria-Mar-sabroso/llms.txt

Use this file to discover all available pages before exploring further.

Docker Compose lets you build the El Sabor Marino Docker image and start the web service in one step, without installing Python or Django directly on your machine. The setup maps port 8000 on your host to the container and mounts your local source code so changes are reflected immediately.

Project files

The docker-compose.yml and Dockerfile at the root of the repository define the entire environment.
services:
  web:
    build: .
    ports:
      - "8000:8000"
    volumes:
      - .:/app
The build: . instruction tells Compose to build the image from the local Dockerfile. The ports mapping exposes the app at http://localhost:8000. The volumes entry mounts the current directory into /app inside the container, so edits you make locally are visible without rebuilding the image.

Starting the application

1

Build and start the container

From the project root, run:
docker-compose up --build
This builds the Docker image (installing dependencies from requirements.txt) and starts the web service. The --build flag ensures the image is rebuilt if any files have changed.
2

Open the app in your browser

Navigate to http://localhost:8000 to view the El Sabor Marino home page. The Django admin panel is available at http://localhost:8000/admin/.
3

Apply migrations

In a separate terminal, run database migrations inside the running container:
docker-compose exec web python manage.py migrate
4

Create a superuser (optional)

To access the Django admin panel, create an admin account:
docker-compose exec web python manage.py createsuperuser

Common commands

TaskCommand
Start in the backgrounddocker-compose up -d --build
Stop the containersdocker-compose down
View live logsdocker-compose logs -f
Run a management commanddocker-compose exec web python manage.py <command>

Live code reloading

The .:/app volume mount means any file you edit on your local machine is immediately available inside the container. Django’s development server watches for file changes and reloads automatically, so you do not need to restart the container after editing Python files or templates.

Using Docker Compose for production

The Dockerfile uses manage.py runserver, which is Django’s development server. It is single-threaded, not designed to handle concurrent requests, and should never be used in production.For production deployments with Docker, replace the CMD in the Dockerfile with Gunicorn (already included in requirements.txt):
CMD ["gunicorn", "config.wsgi:application", "--bind", "0.0.0.0:8000"]
Also review the production deployment guide to complete the required security configuration before going live.

Build docs developers (and LLMs) love