diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 363ad174..ce86061a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,18 +50,3 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.github_token }} REQUIREMENTS: docs/requirements.txt -# deploy: -# needs: test -# runs-on: ubuntu-latest -# environment: -# name: demo -# url: http://demo.baby-buddy.net -# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} -# steps: -# - uses: actions/checkout@v3 -# - name: Deploy demo -# uses: akhileshns/heroku-deploy@v3.12.12 -# with: -# heroku_api_key: ${{ secrets.HEROKU_API_KEY }} -# heroku_app_name: ${{ secrets.HEROKU_APP_NAME }} -# heroku_email: ${{ secrets.HEROKU_EMAIL }} diff --git a/README.md b/README.md index c24eaf4e..4891977b 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ guess work. ## Demo -A [demo of Baby Buddy](http://demo.baby-buddy.net) is available on Heroku. -The demo instance resets every hour. Login credentials are: +A [demo of Baby Buddy](https://demo.baby-buddy.net) is available. The demo instance +resets every hour. Login credentials are: - Username: `admin` - Password: `admin` diff --git a/app.json b/app.json deleted file mode 100644 index 8ad68547..00000000 --- a/app.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "Baby Buddy", - "description": "Helps caregivers track baby's habits to learn about and predict needs without (as much) guess work.", - "keywords": [ - "baby", - "baby buddy", - "dashboard", - "django", - "infant", - "newborn", - "python", - "self-host" - ], - "repository": "https://github.com/babybuddy/babybuddy", - "website": "https://docs.baby-buddy.net", - "buildpacks": [ - { - "url": "heroku/python" - } - ], - "env": { - "DISABLE_COLLECTSTATIC": { - "description": "Prevent static asset collection.", - "generator": "secret" - }, - "DJANGO_SETTINGS_MODULE": { - "description": "A prebuilt configuration for Heroku.", - "value": "babybuddy.settings.heroku" - }, - "SECRET_KEY": { - "description": "Used for the auth system.", - "generator": "secret" - } - }, - "environments": { - "review": { - "scripts": { - "postdeploy": "python manage.py reset --no-input" - } - } - } -} diff --git a/babybuddy/settings/.gitignore b/babybuddy/settings/.gitignore index 3e298eed..f3ee60ef 100644 --- a/babybuddy/settings/.gitignore +++ b/babybuddy/settings/.gitignore @@ -2,11 +2,8 @@ !__init__.py !base.py !ci.py +!clever-cloud.py !development.py !gitpod.py -!heroku.py !production.example.py -!railway.py -!render.py !test.py -!clever-cloud.py diff --git a/babybuddy/settings/heroku.py b/babybuddy/settings/heroku.py deleted file mode 100644 index a79cbfd6..00000000 --- a/babybuddy/settings/heroku.py +++ /dev/null @@ -1,34 +0,0 @@ -import dj_database_url - -from .base import * - -# Default to not allow uploads. -# Heroku does not support file storage for this functionality. - -BABY_BUDDY["ALLOW_UPLOADS"] = bool( - strtobool(os.environ.get("ALLOW_UPLOADS") or "False") -) - - -# Database -# https://docs.djangoproject.com/en/4.0/ref/settings/#databases - -DATABASES = {"default": dj_database_url.config(conn_max_age=500)} - - -# Email -# https://docs.djangoproject.com/en/4.0/topics/email/ -# https://devcenter.heroku.com/articles/sendgrid#python - -SENDGRID_USERNAME = os.environ.get("SENDGRID_USERNAME", None) # noqa: F405 -SENDGRID_PASSWORD = os.environ.get("SENDGRID_PASSWORD", None) # noqa: F405 - -# Use SendGrid if we have the addon installed, else just print to console which -# is accessible via Heroku logs -if SENDGRID_USERNAME and SENDGRID_PASSWORD: - EMAIL_HOST = "smtp.sendgrid.net" - EMAIL_HOST_USER = SENDGRID_USERNAME - EMAIL_HOST_PASSWORD = SENDGRID_PASSWORD - EMAIL_PORT = 587 - EMAIL_USE_TLS = True - EMAIL_TIMEOUT = 60 diff --git a/docs/configuration/storage.md b/docs/configuration/storage.md index fed649fb..8c705f67 100644 --- a/docs/configuration/storage.md +++ b/docs/configuration/storage.md @@ -4,8 +4,7 @@ *Default:* `True` -Whether to allow uploads (e.g., of Child photos). For some deployments (Heroku) -this setting will default to False due to the lack of available persistent storage. +Whether to allow uploads (e.g., of Child photos). ## `AWS_ACCESS_KEY_ID` @@ -29,9 +28,8 @@ See also: [`AWS_STORAGE_BUCKET_NAME`](#aws_storage_bucket_name) *Default:* `None` -If you would like to use AWS S3 for storage on ephemeral storage platforms like -Heroku you will need to create a bucket and add its name. See django-storages' -[Amazon S3 documentation](https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html). +If you would like to use AWS S3 for storage you will need to create a bucket and add +its name. See django-storages' [Amazon S3 documentation](https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html). ## `AWS_S3_ENDPOINT_URL` diff --git a/docs/index.md b/docs/index.md index b04ab1b8..73b82e40 100644 --- a/docs/index.md +++ b/docs/index.md @@ -6,8 +6,8 @@ guess work. ## Demo -A [demo of Baby Buddy](http://demo.baby-buddy.net) is available on Heroku. -The demo instance resets every hour. Login credentials are: +A [demo of Baby Buddy](http://demo.baby-buddy.net) is available. The demo instance +resets every hour. Login credentials are: - Username: `admin` - Password: `admin` diff --git a/docs/setup/deployment.md b/docs/setup/deployment.md index e8c65181..4f3fbb4f 100644 --- a/docs/setup/deployment.md +++ b/docs/setup/deployment.md @@ -40,30 +40,6 @@ export DJANGO_SETTINGS_MODULE="babybuddy.settings.base" python3 /app/babybuddy/manage.py clearsessions ``` -## Heroku - -[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://dashboard.heroku.com/new?button-url=https%3A%2F%2Fgithub.com%2Fbabybuddy%2Fbabybuddy&template=https%3A%2F%2Fgithub.com%2Fbabybuddy%2Fbabybuddy) - -For manual deployments to Heroku without using the "deploy" button, make sure to -create the following settings before pushing: - -```shell -heroku config:set DISABLE_COLLECTSTATIC=1 -heroku config:set DJANGO_SETTINGS_MODULE=babybuddy.settings.heroku -heroku config:set SECRET_KEY= -heroku config:set TIME_ZONE= -``` - -See [Configuration](../configuration/intro.md) for other settings that can be controlled -by `heroku config:set`. - -After an initial push, execute the following commands: - -```shell -heroku run python manage.py migrate -heroku run python manage.py createcachetable -``` - ## Clever Cloud To deploy on [Clever Cloud](https://www.clever-cloud.com), log in to your diff --git a/runtime.txt b/runtime.txt index 47c0b109..b5f092a9 100644 --- a/runtime.txt +++ b/runtime.txt @@ -1 +1 @@ -python-3.9.13 \ No newline at end of file +python-3.9.15 \ No newline at end of file