diff --git a/README.md b/README.md index 4c7156664..0b41712be 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,33 @@ Azimutt goal is to be your ultimate tool to understand your database. You can use our [Docker image](https://github.com/azimuttapp/azimutt/pkgs/container/azimutt) to easily deploy it. Here is the [full guide](INSTALL.md). +## Deploy on Heroku + +You can use our Heroku template which includes Azimutt web app, a Postgres database, Stackhero S3 storage and Mailgun. + +[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://www.heroku.com/deploy) + +After succeed deployment, you will need to configure config vars + +```bash +# Replace with your app-name +HEROKU_APP= + +# Set PHX_HOST with the URL of the app +heroku config:set PHX_HOST=$(heroku info -s | grep "web_url" | sed 's|web_url=https://||; s|/$||') + +# Copy Stackhero access key to S3_KEY_ID +heroku config:set S3_KEY_ID=$(heroku config:get S3_ROOT_ACCESS_KEY) + +# Copy Stackhero secret key to S3_KEY_SECRET +heroku config:set S3_KEY_SECRET=$(heroku config:get S3_ROOT_SECRET_KEY) +``` + +Finally you will need to create the `azimutt` bucket on Stackhero: + +- connect to Stackhero from your Heroku dashboard +- use values of `S3_ROOT_ACCESS_KEY` and `S3_ROOT_SECRET_KEY` to log in +- create a bucket named `azimutt` ## Local development @@ -72,7 +99,6 @@ Other things: - API documentation is accessible at [`/api/v1/swagger`](http://localhost:4000/api/v1/swagger) - You can use `pnpm --filter "azimutt-editor" run book` to start Elm design system & components, and access it with [localhost:4002](http://localhost:4002) - ### command semantics We have a lot of projects with a lot of commands, here is how they are structured: @@ -92,7 +118,6 @@ We have a lot of projects with a lot of commands, here is how they are structure - `pnpm --filter "azimutt-editor" run book` to launch the Elm design system - ### Setup Stripe #### Config @@ -102,7 +127,6 @@ We have a lot of projects with a lot of commands, here is how they are structure - Copy your webhook signing secret to `STRIPE_WEBHOOK_SIGNING_SECRET` variable in your `.env` file (looks like `whsec_...`) - Go to [your Stripe dashboard](https://dashboard.stripe.com/test/apikeys) to obtain your API Key and copy it into `STRIPE_API_KEY` in your `.env` file (looks like: `sk_test_...`) - #### Payments When testing interactively, use a card number, such as `4242 4242 4242 4242`. Enter the card number in the Dashboard or in any payment form. @@ -112,13 +136,12 @@ Use any value you like for other form fields. See more in the [stripe testing documentation](https://stripe.com/docs/testing) - ## Stack -* [Production](https://azimutt.app) & [Staging](https://azimutt.dev) -* [Error logs](https://sentry.io/organizations/azimuttapp/issues/?project=6635088) with [Sentry](https://sentry.io) -* Design using [TailwindCSS Framework](https://tailwindcss.com) -* [Credo](http://credo-ci.org) for static code analysis (automatically run with pre-commit) +- [Production](https://azimutt.app) & [Staging](https://azimutt.dev) +- [Error logs](https://sentry.io/organizations/azimuttapp/issues/?project=6635088) with [Sentry](https://sentry.io) +- Design using [TailwindCSS Framework](https://tailwindcss.com) +- [Credo](http://credo-ci.org) for static code analysis (automatically run with pre-commit) ## License diff --git a/app.json b/app.json new file mode 100644 index 000000000..05bc4de6d --- /dev/null +++ b/app.json @@ -0,0 +1,58 @@ +{ + "name": "Azimutt", + "description": "Next-Gen ERD: Design, Explore, Document and Analyze your database.", + "repository": "https://github.com/azimuttapp/azimutt", + "logo": "https://azimutt.app/images/logo_dark.svg", + "keywords": [ + "erd", + "entity-relationship diagram", + "database tool", + "database schema", + "diagram" + ], + "stack": "container", + "addons": [ + { "plan": "heroku-postgresql", "as": "DATABASE" }, + { "plan": "ah-s3-object-storage-stackhero", "as": "S3" }, + { "plan": "mailgun" } + ], + "env": { + "PHX_SERVER": "true", + "PORT": { + "description": "The port on which the server runs", + "value": "4000" + }, + "SECRET_KEY_BASE": { + "generator": "secret" + }, + "FILE_STORAGE_ADAPTER": "s3", + "AUTH_PASSWORD": { + "description": "Enable password-based authentication", + "value": "true" + }, + "DATABASE_ENABLE_SSL": { + "description": "Enable SSL for database connections", + "value": "true" + }, + "SKIP_ONBOARDING_FUNNEL": { + "description": "Skip the onboarding funnel for quicker testing", + "value": "true" + }, + "SKIP_EMAIL_CONFIRMATION": { + "description": "Skip email confirmation for quicker access", + "value": "true" + }, + "PUBLIC_SITE": { + "description": "Flag to control if the site should be public", + "value": "false" + }, + "EMAIL_ADAPTER": { + "description": "Email service adapter", + "value": "mailgun" + }, + "MAILGUN_BASE_URL": { + "description": "Mailgun base url", + "value": "https://api.eu.mailgun.net/v3" + } + } +} diff --git a/heroku.yml b/heroku.yml new file mode 100644 index 000000000..2b8f79bb6 --- /dev/null +++ b/heroku.yml @@ -0,0 +1,3 @@ +build: + docker: + web: Dockerfile \ No newline at end of file