Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heroku One Click deploy added #357

Merged
merged 1 commit into from
May 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# README
<p align="center">
<img src="https://getmiru.com/assets/images/image01.svg?v=097ef681" width="200" />
<br/>
</p>

## Miru-Web
Miru is an open-source tool, designed to make time tracking, invoice management, and accounting easy for small businesses worldwide. It is a platform for organizations to help them streamline their workflow.

Saeloun timetracking application.

### Installation
## Installation

1. Clone repo to local

Expand Down Expand Up @@ -37,7 +38,9 @@ nvm install $(cat .nvmrc)
```
brew install postgresql
```

6. Install Redis

```
brew install redis
```
Expand All @@ -61,8 +64,8 @@ cp .env.example .env
```

10. Update `DATABASE_URL` in `.env` as per local `psql` creds. For example, if
the user is `root` and password is `password`, change the variable as
`DATABASE_URL="postgres://root:password@localhost/miru_web?encoding=utf8&pool=5&timeout=5000"`
the user is `root` and password is `password`, change the variable as
`DATABASE_URL="postgres://root:password@localhost/miru_web?encoding=utf8&pool=5&timeout=5000"`

11. Update `APP_BASE_URL` in `.env` to `localhost:3000`
12. Run `bin/rails db:create RAILS_ENV=development` to create the database
Expand Down Expand Up @@ -150,3 +153,11 @@ command
cd cypress
yarn run cy:open:staging
```

## Deployment

### Heroku one-click deploy

You can deploy Miru on Heroku using the one-click-deployment button:

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/saeloun/miru-web/tree/main)
53 changes: 36 additions & 17 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
{
"name": "MiruWeb",
"name": "Miru",
"repository": "https://github.com/saeloun/miru-web",
"addons": [
{
"plan": "heroku-postgresql:hobby-dev"
}
],
"description": "Miru is an open-source to for time tracking, invoice management, and accounting easy for small businesses worldwide.",
"website": "https://getmiru.com/",
"logo": "https://getmiru.com/assets/images/image01.svg",
"success_url": "/",
"env": {
"MAILER_SENDER": {
"description": "The email address to use as the sender",
"value": "miru-review@saeloun.com"
"SECRET_TOKEN": {
"description": "A secret key for verifying the integrity of signed cookies.",
"generator": "secret"
},
"RACK_ENV": {
"description": "Environment for rack middleware.",
"value": "production"
},
"EMAIL_DELIVERY_METHOD": {
"description": "The email delivery method to use",
"value": "letter_opener_web"
"RAILS_ENV": {
"description": "Environment for rails middleware.",
"value": "production"
},
"JWT_SECRET_KEY": {
"description": "The secret key for the JWT",
"value": "fc68556be046e0972ccd4608d10aa36f01adf7fd9eeae05c792308f973be79c055f0a72f8b76cd5aa0740622d263a93c2b3f6e51ad2873afda81e6a0724884c2"
"APP_BASE_URL": {
"description": "Base URL for the application.",
"value": "https://CHANGE.herokuapp.com"
}
},
"formation": {
"web": {
"quantity": 1,
"size": "FREE"
},
"worker": {
"quantity": 1,
"size": "FREE"
}
},
"image": "heroku/ruby",
"addons": [ "heroku-redis", "heroku-postgresql"],
"buildpacks": [
{
"url": "heroku/nodejs"
Expand All @@ -28,7 +43,11 @@
"url": "heroku/ruby"
}
],
"scripts": {
"postdeploy": "bundle exec rails db:migrate && bundle exec rails db:seed"
"environments": {
"test": {
"scripts": {
"postdeploy": "bundle exec rails db:migrate && bundle exec rails db:seed"
}
}
}
}