Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #22 (WIP!) #32

Closed
wants to merge 2 commits into from
Closed

Conversation

pedrofracassi
Copy link

@pedrofracassi pedrofracassi commented Dec 31, 2018

I fixed the Missing Procfile problem from #22 by copying it to the WORKDIR. Then, upon deploy, dokku couldn't find manage,py, so I copied everything to the WORKDIR. Problem is dokku seems to be passing python manage.py runserver 0.0.0.0:$PORT to manage.py as arguments, instead of running it as a separate command.

@pedrofracassi
Copy link
Author

pedrofracassi commented Dec 31, 2018

remote:        manage.py migrate: error: unrecognized arguments: manage.py runserver 0.0.0.0:5000
remote:        usage: manage.py migrate [-h] [--noinput] [--database DATABASE] [--fake]
remote:                                 [--fake-initial] [--run-syncdb] [--version]
remote:                                 [-v {0,1,2,3}] [--settings SETTINGS]
remote:                                 [--pythonpath PYTHONPATH] [--traceback] [--no-color]
remote:                                 [app_label] [migration_name]
remote:        manage.py migrate: error: unrecognized arguments: manage.py runserver 0.0.0.0:5000

I'm not familiar with Django, but migrate seems to take two arguents (app_label and migration_name)

@@ -1,4 +1,4 @@
FROM python:3
WORKDIR /work
COPY requirements.txt /work
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not even sure if this is the right solution at all, but if there is a "COPY ." at all, it shouldn't occur until after the pip install as this way around means it'll reinstall everything every time anyone makes any source changes as opposed to only when the dependencies change.

@@ -0,0 +1 @@
python manage.py migrate && python manage.py runserver "0.0.0.0:$PORT"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What runs this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, shouldn't have commited that.

@@ -1,2 +1,2 @@
web: python manage.py migrate && python manage.py runserver "0.0.0.0:$PORT"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "||" will result in if the "migrate" returns 0 the "runserver" won't happen at all.

@palfrey
Copy link
Owner

palfrey commented Jan 27, 2019

Obsoleted by #34

@palfrey palfrey closed this Jan 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants