django-simple-deploy
django-simple-deploy copied to clipboard
Chronicle first use case with platform.sh
I'm going to chronicle my steps using django-simple-deploy with very little experience.
Thought to use Fly.io for the test, as I've never used it before. Unfortunately, didn't have my credit card handy to verify my identity, so I'll try this one later. However, I do have a platform.sh account, so that will be my test.
First, I'll open up my django application and install the library... Using my django-slideshow demo app.
What follows is my experience and any questions/issues that come up.
First step, adding django-simple-deploy
to my project... easy enough:
Make sure my project is running locally with no issue:
huzzah...
The docs mention that I need the platformshconfig
library, so I installed that as well:
Don't forget to add simple_deploy
to the INSTALLED_APPS
in settings.py
Done...
Going to try the configuration-only deployment.
First, need to create a platform app... Made sure I could log in with the platform CLI. Ran the platform command and was prompted to log in (this is the intended step for logging in with the CLI)
Now, should be ready to create a platform app using:
platform create
Okay, looks like that worked.
So now I can run the command:
python manage.py simple_deploy --platform platform_sh
Let's see what happened.
Whoops.
Looks like I didn't activate my virtual environment.... 🤦♂️
Okay, after activating environment and running command, got this:
Hmm...
So going to commit my previous changes... These are related to adding django-simple-deploy and platformshconfig to my list of dependencies (pyproject.toml
) and adding simple_deploy
to my INSTALLED_APPS
...
Okay, so went ahead and committed to git with those things added and ran the command again....
Looking good...
Looks like since I am using PDM as my dependency manager, simple_deploy is finding my pyproject.toml
file and determining that I am using Poetry instead of PDM. Using pip show
doesn't work in this case ... (the pdm command would actually be pdm list
)
Okay, after activating environment and running command, got this:
Hmm...
Thanks! See #136.
Looks like since I am using PDM as my dependency manager, simple_deploy is finding my
pyproject.toml
file and determining that I am using Poetry instead of PDM. Usingpip show
doesn't work in this case ... (the pdm command would actually bepdm list
)
Thanks again. See #137.