Skip to content

Commit

Permalink
feat: add heroku deploy button (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonylyjones authored Jun 28, 2024
1 parent 9929ba9 commit 8911863
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 8 deletions.
39 changes: 31 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<app-name>

# 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

Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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

Expand Down
58 changes: 58 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
3 changes: 3 additions & 0 deletions heroku.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build:
docker:
web: Dockerfile

0 comments on commit 8911863

Please sign in to comment.