Skip to content

Commit

Permalink
feat: new make commands to interact with dev container
Browse files Browse the repository at this point in the history
* dev.stop: Stop the running container
* dev.migrate: Run migrations in the container
* dev.logs: View logs from the container
* dev.exec: Execute to the dev container
  • Loading branch information
CodeWithEmad committed Aug 1, 2024
1 parent b8f761c commit 36cacf4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cookiecutter-xblock/{{cookiecutter.repo_name}}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ dev.build:
dev.run: dev.clean dev.build ## Clean, build and run test image
docker run -p 8000:8000 -v $(CURDIR):/usr/local/src/$(REPO_NAME) --name $(REPO_NAME)-dev $(REPO_NAME)-dev

dev.stop: ## Stop the running container
docker stop $(REPO_NAME)-dev

dev.migrate: ## Run migrations in the container
docker exec -it $(REPO_NAME)-dev python manage.py migrate

dev.logs: ## View logs from the container
docker logs -f $(REPO_NAME)-dev

dev.exec: ## Execute to the dev container
docker exec -it $(REPO_NAME)-dev /bin/bash

## Localization targets

extract_translations: ## extract strings to be translated, outputting .po files
Expand Down

0 comments on commit 36cacf4

Please sign in to comment.