You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*:convenience_store:**Redis** In-memory data structure [store](https://redis.io/), used as a distributed, in-memory key–value database, cache and message broker
58
58
*:gear:**Common** Base models and repository classes for common CRUD operations and database schemas.
59
59
*:seedling:**Celery**[Asynchronous](https://docs.celeryq.dev/en/stable/getting-started/introduction.html) task or job queue
60
-
*:inbox_tray:**Continuous Integration/Deployment** Modular [GitHub Actions](https://github.com/features/actions) to lint, test, and deploy to your favorite platform. Automatically includes [Codecov](https://about.codecov.io/) reporting.
60
+
*:inbox_tray:**Continuous Integration/Deployment** Modular [GitHub Actions](https://github.com/features/actions) to lint, test, and deploy to your favorite platform-as-a-service. Automatically includes [Codecov](https://about.codecov.io/) reporting.
61
61
*:leftwards_arrow_with_hook:**pre-commit**[Git hooks](https://pre-commit.com/) to maintain code quality using modern tooling (ruff, black, isort)
62
62
*:rocket:**Sentry** Application monitoring and error tracking. You can sign up for free at [sentry.io](https://sentry.io/)
63
63
@@ -76,7 +76,7 @@ The input variables, with their default values (some auto generated) are:
76
76
*`use_celery`: Whether to use Celery/Beat and Redis for asynchronous/scheduled tasks. Default `no`
77
77
*`use_sentry`: Whether to use Sentry for application monitoring and error tracking. Default `no`
78
78
*`github_username`: The username of the GitHub user. Used for badge display in generated project `README.md`
79
-
*`deployments`: Deploy to your favorite platform, Render.com (and more to come). Default `none`
79
+
*`deployments`: Deploy to your favorite platform, Render.com, DigitalOcean, (and more to come). Default `none`
80
80
81
81
## Documentation
82
82
See full documentation [here](https://cookiecutter-fastapi-backend.readthedocs.io/en/latest/).
There a couple of house keeping steps to take before deploying to DigitalOcean. You can
5
+
read more about the steps `here <https://docs.digitalocean.com/products/app-platform/how-to/deploy-from-github-actions/#prerequisites>`_.
6
+
7
+
.. note::
8
+
9
+
Be sure you have the official `DigitalOcean GitHub App <https://cloud.digitalocean.com/apps/github/install>`_ installed in your GitHub account.
10
+
It is recommended to only allow the app to access the repositories you want to deploy.
11
+
12
+
Meaning, once your project has been scaffolded with this cookiecutter, you'll have to push
13
+
it to GitHub for it to be available to DigitalOcean.
14
+
15
+
Once the prerequisites are met:
16
+
--------------------------------
17
+
18
+
Provision the app using the provided script ``bin/provision-app.sh``.
19
+
20
+
.. code-block:: bash
21
+
22
+
$ ./bin/provision-app.sh
23
+
24
+
This creates app based on the spec file ``digitalocean.yaml`` at the root of the project. The services will get created, but
25
+
will fail deployment, which is expected. They fail because we've deployed the app from the CLI without any of the environment variables.
26
+
27
+
Ensure the following variables are in the Apps Environment Variables, and in your GitHub repository secrets:
28
+
29
+
- ``POSTGRES_USER``
30
+
- ``POSTGRES_PASSWORD``
31
+
- ``POSTGRES_DB``
32
+
- ``POSTGRES_HOST``
33
+
- ``POSTGRES_PORT``
34
+
35
+
.. note::
36
+
37
+
The environment variables are injected into the ``deploy-app`` step in the GitHub Actions workflow.
38
+
39
+
Once saved, the deployment for the app will get re-triggered, and the services will be deployed successfully. Now, any merges into your main branch will trigger a deployment.
0 commit comments