You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Cloned the drunc-ui repository from GitHub to a directory in Windows:
git clone https://github.com/ImperialCollegeLondon/drunc_ui.git
cd drunc_ui
Setting Up Docker with WSL
I am using WSL 2 with Ubuntu as my distribution. Initially, Docker wasn’t properly integrated with WSL, so I had to enable the WSL integration in Docker Desktop.
After enabling integration, I ensured Docker was running in the WSL environment:
docker --version
Running Docker Compose
From within the project directory, I started the Docker services using Docker Compose:
docker compose up
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:
docker compose up
In a new terminal, I entered the container that runs the Django app:
docker compose exec app bash
Once inside the container, I ran the following command to create the superuser:
python manage.py createsuperuser
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:
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock
To resolve this, I had to add my user to the docker group:
sudo usermod -aG docker $USER
After restarting my session (or running newgrp docker), I could run Docker commands without needing sudo.
Suggestions for Documentation
Create a Superuser
Add a section explaining that after starting the Docker containers, users must create a Django superuser by entering the app container and running the createsuperuser command. The documentation should highlight that this step is necessary to log in to the application.
Docker Permissions
Mention that users might need to add themselves to the 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
It might be helpful to include a brief guide on how to set up Docker with WSL 2, especially for users on Windows, as WSL integration can sometimes be tricky to configure.
The text was updated successfully, but these errors were encountered:
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.
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
git clone https://github.com/ImperialCollegeLondon/drunc_ui.git cd drunc_ui
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:
docker compose exec app bash
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:sudo usermod -aG docker $USER
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
The text was updated successfully, but these errors were encountered: