I am attempting to run a Django application using the `runserver` management command in a pipelines build machine. I am doing this so that I can perform some testing that requires a running django instance.
When I run the runserver command and tell it to run on `0.0.0.0:8000` it does not show the normal startup information, and if I run it with nohup and then try to curl `0.0.0.0:8000` on the build machine I get the error `0curl: (7) Failed to connect to 0.0.0.0 port 8000: Connection refused`.
I can successfully get the django app running with the same commands in a local version of the docker image the build machine uses, so it seems to be something specific to running on the build machine. I have also tried switching up the port it is running on to see if that resolves it but to no avail.
My pipeline looks like:
name: Run UI tests
- apt-get update && apt-get install -y firefox chromium-browser libcurl4-openssl-dev libssl-dev
- pip3 install virtualenv
- virtualenv -p python3 venv
- . venv/bin/activate
- pip install -r app/test-requirements.txt
- export TZ='Pacific/Auckland'
- nvm install
- npm install
- nohup npm run start &
- python app/manage.py migrate --verbosity=3 --settings=app.settings.test-ui
- python app/manage.py createcachetable --verbosity=3 --settings=app.settings.test-ui
- nohup python app/manage.py runserver 0.0.0.0:8000 --verbosity=3 --settings=app.settings.test-ui & # this step is where I have an issue.
- npm run test-ui -- all -r spec,xunit:./app/test-reports/testcafe.xml
Any thoughts? The other management commands like `migrate` and `createcachetable` work fine so it seems to be specific to `runserver`.
...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events