This doc is designed for managing the Docker-based project. 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.
- build: Builds Docker images for both production environment.
make build- start: Starts a specific container or all containers. Specify the container with the
cvariable.
make start c=container_name- restart: Restart 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- dbrestore: Restores the database from a backup file.
make dbrestore- update-migrations: Creates new migration files based on changes in models.
make update-migrations- migrate: Runs database migrations, with the
authapp being migrated first.
make migrate- createsuperuser: Create an admin user.
make createsuperuser- qgisfeed-shell: Opens a shell in the
qgisfeedcontainer.
make qgisfeed-shell- qgisfeed-logs: Tails the requests logs in the
qgisfeedcontainer.
make qgisfeed-logs- nginx-shell: Opens a shell in the
nginxcontainer.
make nginx-shell- nginx-logs: Tails the requests logs in the
nginxcontainer.
make nginx-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"- dev-build: Builds Docker images for the development environment.
make dev-build- dev-start: Start all containers in development environment.
make dev-start- dev-logs: Show the logs in development mode.
make dev-logs- dev-update-migrations: Creates new migration files based on changes in models.
make dev-update-migrations- dev-migrate: Runs database migrations, with the
authapp being migrated first.
make dev-migrate- dev-dbseed: Seed db with JSON data from /fixtures/*.json.
make dev-dbseed- dev-createsuperuser: Create an admin user.
make dev-createsuperuser- dev-runtests: Running tests in development mode.
make dev-runtests- dev-stop: Stopping the development server.
make dev-stop