Open cvzbynek opened 5 days ago
Hi @cvzbynek. Thanks for this. Happy to link to some resources on getting Docker setup on different platforms. The user creation in docker is covered in the getting started with the process manager ui section, so maybe we need to highlight this a little better?
@cc-a I see now. I haven't gone to that part very thoroughly, since I didn't get to Process Manager itself. I would restructuralize to stress the need to make a superuser to actually access anything. Not just the Process Manager.
Ok, we have an issue to create some more extensive documentation so I'll link this under that and take a pass when I look at it.
Issue: Steps to Set Up drunc-ui and Create a Superuser on Windows
Description
While setting up the drunc-ui application, I encountered a few challenges, especially around creating a Django superuser and ensuring the correct permissions for Docker. I’ve documented the exact steps I followed and where I encountered issues, which might help in improving the developer documentation.
Steps Tried So Far
Cloning the Repository
Setting Up Docker with WSL
Running Docker Compose
From within the project directory, I started the Docker services using Docker Compose:
The app launched successfully, but when accessing the app at http://localhost:8000, I was prompted for a username and password, which I didn’t have yet.
Creating a Superuser (Missing from Documentation)
To create the superuser, I followed these steps:
First, I ensured Docker containers were running in one terminal:
In a new terminal, I entered the container that runs the Django app:
Once inside the container, I ran the following command to create the superuser:
I followed the prompts to set up a username, email, and password for the superuser.
After exiting the container, I was able to log into the app at http://localhost:8000 using the superuser credentials.
Docker Permissions Issue
Initially, I encountered a permissions issue when running
docker compose up
, which resulted in the following error:To resolve this, I had to add my user to the
docker
group:After restarting my session (or running
newgrp docker
), I could run Docker commands without needingsudo
.Suggestions for Documentation
Create a Superuser
createsuperuser
command. The documentation should highlight that this step is necessary to log in to the application.Docker Permissions
docker
group to avoid permission errors when running Docker commands. This step is common when working with Docker in WSL or Linux environments.WSL Setup