Name | dsd-codered JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | A plugin for django-simple-deploy, supporting deployments to CodeRed. |
upload_time | 2025-01-12 21:46:02 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | None |
keywords |
django
deployment
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# dsd-codered
A plugin for deploying Django projects to CodeRed, using django-simple-deploy.
Quick Start
---
To deploy your project to CodeRed, you'll need to take some steps through the CodeRed web site. But once you set up an initial project there, django-simple-deploy can make all the necessary changes to your project for a successful deployment.
## Prerequisites
Deployment to CodeRed requires the following:
- You must be using Git to track your project.
- You need to be tracking your dependencies with a `requirements.txt` file, or be using Poetry or Pipenv.
- You'll need a [CodeRed account](https://app.codered.cloud/login/), and an [API token](https://www.codered.cloud/docs/cli/quickstart/).
- You need to create a Django project in the CodeRed admin interface:
- Choose Django, and set the database to Postgres.
## Configuration-only deployment
First, install `dsd-codered` and add `simple_deploy` to `INSTALLED_APPS` in *settings.py*:
```sh
$ pip install dsd-codered
# Add "simple_deploy" to INSTALLED_APPS in settings.py.
$ git commit -am "Added simple_deploy to INSTALLED_APPS."
```
When you install `dsd-codered`, it will install `django-simple-deploy` as a dependency. `cr` is CodeRed's [CLI tool](https://www.codered.cloud/docs/cli/); if you already have it installed system-wide, you don't need to install it to your project.
Now run the `deploy` command:
```sh
$ python manage.py deploy
```
This is the `deploy` command from `django-simple-deploy`, which makes all the changes you need to run your project on CodeRed.
At this point, you should review the changes that were made to your project. Running `git status` will show you which files were modified, and which files were created for a successful deployment. If you want to continue with the deployment process, commit these changes. Then set an environment variable with your CodeRed API token, and run the `cr deploy` command:
```sh
$ git add .
$ git commit -m "Configured for deployment to CodeRed."
$ export CR_TOKEN=<api-token>
$ cr deploy <codered-app-name>
```
Here, `<codered-app-name>` is the name you chose when you created a new project in the CodeRed admin interface. The last line of output will show you the URL for your deployed project. You can also find this URL in your CodeRed admin interace.
You can find a record of the deployment process in `simple_deploy_logs`. It contains most of the output you saw when running `deploy`.
## Automated deployment
You can automate most of this process:
- Create a Django project in the CodeRed admin interface. Choose Django, and set the database to Postgres.
- Next, install `dsd-codered` and add `simple_deploy` to `INSTALLED_APPS` in *settings.py*:
```sh
$ pip install dsd-codered
# Add "simple_deploy" to INSTALLED_APPS in settings.py.
```
Now, set an environment variable with your CodeRed API token and run `deploy` in the fully automated mode:
```sh
$ export CR_TOKEN=<api-token>
$ python manage.py deploy --automate-all
```
You'll be prompted for the name of the project you created in the CodeRed dashboard. Your project will then be configured, all changes will be committed, and your project will be deployed to CodeRed's servers. When everything's complete, your project should open in a new browser tab.
Raw data
{
"_id": null,
"home_page": null,
"name": "dsd-codered",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "django, deployment",
"author": null,
"author_email": "Eric Matthes <ehmatthes@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/fe/d8/0db9d7ee2b44b94df2c8a7507c4fe30be1ae4d7b1b09557baf45c8f4d6cd/dsd_codered-0.2.0.tar.gz",
"platform": null,
"description": "# dsd-codered\n\nA plugin for deploying Django projects to CodeRed, using django-simple-deploy.\n\nQuick Start\n---\n\nTo deploy your project to CodeRed, you'll need to take some steps through the CodeRed web site. But once you set up an initial project there, django-simple-deploy can make all the necessary changes to your project for a successful deployment.\n\n## Prerequisites\n\nDeployment to CodeRed requires the following:\n\n- You must be using Git to track your project.\n- You need to be tracking your dependencies with a `requirements.txt` file, or be using Poetry or Pipenv.\n- You'll need a [CodeRed account](https://app.codered.cloud/login/), and an [API token](https://www.codered.cloud/docs/cli/quickstart/).\n- You need to create a Django project in the CodeRed admin interface:\n - Choose Django, and set the database to Postgres.\n\n## Configuration-only deployment\n\nFirst, install `dsd-codered` and add `simple_deploy` to `INSTALLED_APPS` in *settings.py*:\n\n```sh\n$ pip install dsd-codered\n# Add \"simple_deploy\" to INSTALLED_APPS in settings.py.\n$ git commit -am \"Added simple_deploy to INSTALLED_APPS.\"\n```\n\nWhen you install `dsd-codered`, it will install `django-simple-deploy` as a dependency. `cr` is CodeRed's [CLI tool](https://www.codered.cloud/docs/cli/); if you already have it installed system-wide, you don't need to install it to your project.\n\nNow run the `deploy` command:\n\n```sh\n$ python manage.py deploy\n```\n\nThis is the `deploy` command from `django-simple-deploy`, which makes all the changes you need to run your project on CodeRed.\n\nAt this point, you should review the changes that were made to your project. Running `git status` will show you which files were modified, and which files were created for a successful deployment. If you want to continue with the deployment process, commit these changes. Then set an environment variable with your CodeRed API token, and run the `cr deploy` command:\n\n```sh\n$ git add .\n$ git commit -m \"Configured for deployment to CodeRed.\"\n$ export CR_TOKEN=<api-token>\n$ cr deploy <codered-app-name>\n```\n\nHere, `<codered-app-name>` is the name you chose when you created a new project in the CodeRed admin interface. The last line of output will show you the URL for your deployed project. You can also find this URL in your CodeRed admin interace.\n\nYou can find a record of the deployment process in `simple_deploy_logs`. It contains most of the output you saw when running `deploy`.\n\n## Automated deployment\n\nYou can automate most of this process:\n\n- Create a Django project in the CodeRed admin interface. Choose Django, and set the database to Postgres.\n- Next, install `dsd-codered` and add `simple_deploy` to `INSTALLED_APPS` in *settings.py*:\n\n```sh\n$ pip install dsd-codered\n# Add \"simple_deploy\" to INSTALLED_APPS in settings.py.\n```\n\nNow, set an environment variable with your CodeRed API token and run `deploy` in the fully automated mode:\n\n```sh\n$ export CR_TOKEN=<api-token>\n$ python manage.py deploy --automate-all\n```\n\nYou'll be prompted for the name of the project you created in the CodeRed dashboard. Your project will then be configured, all changes will be committed, and your project will be deployed to CodeRed's servers. When everything's complete, your project should open in a new browser tab.\n",
"bugtrack_url": null,
"license": null,
"summary": "A plugin for django-simple-deploy, supporting deployments to CodeRed.",
"version": "0.2.0",
"project_urls": null,
"split_keywords": [
"django",
" deployment"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2fc7cf65a4be2b9c4c3088a81769167fe3df0b318895cb60a52fb2bddfb9805d",
"md5": "cbf1b357a4d82ebe6912d53073278c93",
"sha256": "ded5dcb04ebdce5825201592b42c1defdced86afead596d46aad4bc9c960ac84"
},
"downloads": -1,
"filename": "dsd_codered-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cbf1b357a4d82ebe6912d53073278c93",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 11463,
"upload_time": "2025-01-12T21:46:00",
"upload_time_iso_8601": "2025-01-12T21:46:00.212343Z",
"url": "https://files.pythonhosted.org/packages/2f/c7/cf65a4be2b9c4c3088a81769167fe3df0b318895cb60a52fb2bddfb9805d/dsd_codered-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fed80db9d7ee2b44b94df2c8a7507c4fe30be1ae4d7b1b09557baf45c8f4d6cd",
"md5": "bfc0abf23f029e94323fc32428c6be6e",
"sha256": "17b45b9b564b88116959d23ff4cc953af7b1d3a71856b284effb97a266fa6662"
},
"downloads": -1,
"filename": "dsd_codered-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "bfc0abf23f029e94323fc32428c6be6e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 10852,
"upload_time": "2025-01-12T21:46:02",
"upload_time_iso_8601": "2025-01-12T21:46:02.294136Z",
"url": "https://files.pythonhosted.org/packages/fe/d8/0db9d7ee2b44b94df2c8a7507c4fe30be1ae4d7b1b09557baf45c8f4d6cd/dsd_codered-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-12 21:46:02",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "dsd-codered"
}