I am trying to host a Django project, with reference to the django template provided by railway...
This is my build-logs:
==============
Using Nixpacks
==============
context: 5b586c81b1822e0306ff37347bae4b83
╔═══════════════════════════════ Nixpacks v1.9.0 ══════════════════════════════╗
║ setup │ python38, postgresql, gcc ║
║──────────────────────────────────────────────────────────────────────────────║
║ install │ python -m venv --copies /opt/venv && . /opt/venv/bin/activate ║
║ │ && pip install -r requirements.txt ║
║──────────────────────────────────────────────────────────────────────────────║
║ start │ python manage.py migrate && python manage.py collectstatic ║
║ │ --noinput && gunicorn clusera.wsgi ║
╚══════════════════════════════════════════════════════════════════════════════╝
#1 [internal] load .dockerignore
#1 transferring context: 2B done
#1 DONE 0.0s
#2 [internal] load build definition from Dockerfile
#2 transferring dockerfile: 2.25kB done
#2 DONE 0.0s
#3 [internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1684957838
#3 DONE 0.1s
#4 [stage-0 1/8] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1684957838@sha256:eb26a5ad60faad269d01ac896a4eefb5e7987040d39549dbe5d8cdfd1a830b75
#4 DONE 0.0s
#5 [internal] load build context
#5 transferring context: 57.56MB 0.5s done
#5 DONE 0.5s
here are my deploy-logs (errors):
12 Replies
Project ID:
N/A
N/A
this wouldn't be a railway specific error, have you tried researching the following error message?
psycopg2.errors.DuplicateTable: relation "django_content_type" already exists
Yeah this is something to do with the migrations probably
yes, so you can go ahead and research the appropriate solution to this issue and if you have troubles applying a solution, I can give you guidance
hmm, alright
I think this is happening because of my tables created earlier ... and now It is facing errors while trying to deploy. But I am still in doubt.
This is why migrations are not being applied...
Is there a way to remove tables from db and then migrate
you can connect to the database and remove whatever you want, look at the connect tab
@Brody This was my first time hosting an application thank you so much for not helping me directly. I tried a few times, took so many wrong attempts but I finally managed to run the website successfully. Thanks a lot!
I would like you give it a look https://django-server-production-904d.up.railway.app/
Still working on some bug fixes...
thank you for not helping me directlywell I'm not actually a python dev, plus you wouldn't have gained some more problem solving skills if I had just gave you the answer and I like that design! but work on not refreshing the whole webpage when you enter some stuff
right
I still have to learn that we call it single page application SPA
not really, you can do dynamic content loading in a MPA app too
ok cool