This doc is designed for managing a Docker-based project with the ID qgis-plugins. It includes various commands for building, running, and maintaining both production and development environments. Below is a detailed description of each command available in the Makefile.
- default: Alias for the build command.
make- run: Builds the project and runs the web, migrate, and collectstatic commands.
make run- build: Builds Docker images for both production and development environments.
make build- db: Starts the database container in production mode.
make db- metabase: Starts the Metabase container after ensuring the database is running.
make metabase- web: Starts the web container and scales the
uwsgiservice to 2 instances.
make web- certbot: Starts the Certbot container for managing SSL certificates.
make certbot- migrate: Runs database migrations, with the
authapp being migrated first.
make migrate- update-migrations: Creates new migration files based on changes in models.
make update-migrations- collectstatic: Collects static files for the Django application.
make collectstatic- start: Starts a specific container or all containers. Specify the container with the
cvariable.
make start c=container_name- restart: Restarts a specific container or all containers. Specify the container with the
cvariable.
make restart c=container_name- kill: Stops a specific container or all containers. Specify the container with the
cvariable.
make kill c=container_name- rm: Removes all containers after stopping them.
make rm- rm-only: Removes all containers without stopping them first.
make rm-only- dbrestore: Restores the database from a backup file.
make dbrestore- wait-db: Waits for the database to be ready.
make wait-db- create-test-db: Creates a test database with PostGIS extension.
make create-test-db- rebuild_index: Rebuilds the search index for the Django application.
make rebuild_index- uwsgi-shell: Opens a shell in the
uwsgicontainer.
make uwsgi-shell- uwsgi-reload: Reloads the Django project in the
uwsgicontainer.
make uwsgi-reload- uwsgi-errors: Tails the error logs in the
uwsgicontainer.
make uwsgi-errors- uwsgi-logs: Tails the requests logs in the
uwsgicontainer.
make uwsgi-logs- web-shell: Opens a shell in the NGINX/web container.
make web-shell- web-logs: Tails the logs in the NGINX/web container.
make web-logs- logs: Tails logs for a specific container or all containers. Specify the container with the
cvariable.
make logs c=container_name- shell: Opens a shell in a specific container. Specify the container with the
cvariable.
make shell c=container_name- exec: Executes a specific Docker command. Specify the command with the
cvariable.
make exec c="command"- build-dev: Builds Docker images for the development environment.
make build-dev- devweb-test: Starts the
devwebcontainer for testing, ensuring the database is running.
make devweb-test- devweb: Starts the
devwebcontainer for development, along with RabbitMQ, worker, beat, and webpack containers.
make devweb- devweb-migrate: Runs database migrations in the
devwebcontainer.
make devweb-migrate- devweb-makemigrations: Creates new migration files based on changes in models in the
devwebcontainer.
make devweb-makemigrations app=app_name- devweb-exec: Executes a specific Docker command in the
devwebcontainer. Specify the command with thecvariable.
make devweb-exec c="command"- devweb-shell: Opens a shell in the
devwebcontainer.
make devweb-shell- devweb-runserver: Runs the Django development server inside the
devwebcontainer.
make devweb-runserver- dbseed: Seeds the database with initial data from JSON files in the
fixturesdirectory.
make dbseed