Skip to content

Commit 3b12b59

Browse files
Heroku: Seed data using heroku postdeploy script (ToolJet#186)
* post deploy script * please work * change script tag * crazy scripts * again
1 parent e48fc58 commit 3b12b59

File tree

2 files changed

+55
-51
lines changed

2 files changed

+55
-51
lines changed

app.json

Lines changed: 54 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,60 @@
11
{
2-
"name": "ToolJet",
3-
"description": "ToolJet is an open-source low-code framework to build and deploy internal tools.",
4-
"website": "https://tooljet.io/",
5-
"repository": "https://github.com/tooljet/tooljet",
6-
"logo": "https://app.tooljet.io/assets/images/logo.svg",
7-
"success_url": "/",
8-
"env": {
9-
"RAILS_ENV": {
10-
"description": "Environment for rails middleware.",
11-
"value": "production"
12-
},
13-
"RACK_ENV": {
14-
"description": "Environment for rack middleware.",
15-
"value": "production"
16-
},
17-
"TOOLJET_HOST": {
18-
"description": "Public URL of ToolJet installtion. This is usually https://<app-name-in-first-step>.herokuapp.com",
19-
"value": "https://<app-name-in-first-step>.herokuapp.com"
20-
},
21-
"TOOLJET_SERVER_URL": {
22-
"description": "URL of ToolJet server installtion. (This is same as the TOOLJET_HOST for Heroku deployments)",
23-
"value": "https://<app-name-in-first-step>.herokuapp.com"
24-
},
25-
"LOCKBOX_MASTER_KEY": {
26-
"description": "Key for encrypting datasource credentials.",
27-
"value": ""
28-
},
29-
"SECRET_KEY_BASE": {
30-
"description": "Used by ruby on rails as the input secret to the application's key generator.",
31-
"value": ""
32-
}
2+
"name": "ToolJet",
3+
"description": "ToolJet is an open-source low-code framework to build and deploy internal tools.",
4+
"website": "https://tooljet.io/",
5+
"repository": "https://github.com/tooljet/tooljet",
6+
"logo": "https://app.tooljet.io/assets/images/logo.svg",
7+
"success_url": "/",
8+
"scripts":{
9+
"postdeploy": "bundle exec rails db:seed"
10+
},
11+
"env": {
12+
"RAILS_ENV": {
13+
"description": "Environment for rails middleware.",
14+
"value": "production"
3315
},
34-
"formation": {
35-
"web": {
36-
"quantity": 1,
37-
"size": "FREE"
38-
}
16+
"RACK_ENV": {
17+
"description": "Environment for rack middleware.",
18+
"value": "production"
3919
},
40-
"image": "heroku/ruby",
41-
"addons": ["heroku-postgresql"],
42-
"buildpacks": [
43-
{
44-
"url": "heroku/nodejs"
45-
},
46-
{
47-
"url": "heroku/ruby"
48-
}
49-
],
50-
"environments": {
51-
"test": {
52-
"scripts": {
53-
"test": "bundle exec rake test"
54-
}
20+
"TOOLJET_HOST": {
21+
"description": "Public URL of ToolJet installtion. This is usually https://<app-name-in-first-step>.herokuapp.com",
22+
"value": "https://<app-name-in-first-step>.herokuapp.com"
23+
},
24+
"TOOLJET_SERVER_URL": {
25+
"description": "URL of ToolJet server installtion. (This is same as the TOOLJET_HOST for Heroku deployments)",
26+
"value": "https://<app-name-in-first-step>.herokuapp.com"
27+
},
28+
"LOCKBOX_MASTER_KEY": {
29+
"description": "Key for encrypting datasource credentials.",
30+
"value": ""
31+
},
32+
"SECRET_KEY_BASE": {
33+
"description": "Used by ruby on rails as the input secret to the application's key generator.",
34+
"value": ""
35+
}
36+
},
37+
"formation": {
38+
"web": {
39+
"quantity": 1,
40+
"size": "FREE"
41+
}
42+
},
43+
"image": "heroku/ruby",
44+
"addons": ["heroku-postgresql"],
45+
"buildpacks": [
46+
{
47+
"url": "heroku/nodejs"
48+
},
49+
{
50+
"url": "heroku/ruby"
51+
}
52+
],
53+
"environments": {
54+
"test": {
55+
"scripts": {
56+
"test": "bundle exec rake test"
5557
}
5658
}
59+
}
5760
}

docs/docs/setup/heroku.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Follow the steps below to deploy ToolJet ( both server & client ) on Heroku:
1313
2. Navigate to Heroku dashboard and go to resources tab to verify that the dyno is turned on.
1414
3. Go to settings tab on Heroku dashboard and select 'reveal config vars'.
1515
4. Configure the mandatory environment variables as per the documentation.
16+
5. The default username of the admin is [email protected] and password is password.
1617

1718
:::warning
1819
The one click deployment will create a free dyno and a free postgresql database.

0 commit comments

Comments
 (0)