Update README for Cross-Platform Django Project Setup in django awesome-compose #709

Open
opened 2026-03-07 21:22:24 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @SaadHusayn on GitHub (Aug 27, 2024).

The current README for the Docker Compose and Django/PostgreSQL setup includes a command to create a Django project using sudo:

sudo docker compose run web django-admin startproject composeexample .

This command is specific to Linux environments. On Windows and MacOS, running this command as is will result in an error because sudo is not recognized.

### Tasks
Originally created by @SaadHusayn on GitHub (Aug 27, 2024). The current README for the Docker Compose and Django/PostgreSQL setup includes a command to create a Django project using sudo: ``` sudo docker compose run web django-admin startproject composeexample . ``` This command is specific to Linux environments. On Windows and MacOS, running this command as is will result in an error because sudo is not recognized. ```[tasklist] ### Tasks ```
Author
Owner

@weslord commented on GitHub (Dec 21, 2024):

sudo is a command on macOS.

Also, sudo in this command is not necessarily required on Linux, either, depending on how you've set up your system.

It may be cleaner to remove sudo from the command entirely. The other documentation samples do not include it, nor do the other instances of docker compose [up/down] in that document.

@weslord commented on GitHub (Dec 21, 2024): `sudo` is a command on macOS. Also, `sudo` in this command is not necessarily required on Linux, either, [depending on how you've set up your system](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user). It may be cleaner to remove `sudo` from the command entirely. The other documentation samples do not include it, nor do the other instances of `docker compose [up/down]` in that document.
Author
Owner

@weslord commented on GitHub (Dec 21, 2024):

Whoops, I spoke too soon. My apologies.

Looks like running this without sudo on Linux won't create the data/db directory, and running it with sudo on macOS (with Docker desktop, at least) causes some pretty strange problems with the build step.

@weslord commented on GitHub (Dec 21, 2024): Whoops, I spoke too soon. My apologies. Looks like running this *without* `sudo` on Linux won't create the `data/db` directory, and running it *with* `sudo` on macOS (with Docker desktop, at least) causes some pretty strange problems with the build step.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-compose#709