Skip to content

Commit

Permalink
Add psql in setup to update URLs in setting on install
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Aug 21, 2021
1 parent cb03d05 commit ba36d0c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions Aptfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
postgresql-client
12 changes: 10 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,28 @@
"keywords": ["emails", "newsletter", "mailing-list"],

"buildpacks": [
{
"url": "https://github.com/heroku/heroku-buildpack-apt"
},
{
"url": "https://github.com/knadh/listmonk-heroku"
}
],
"addons": ["heroku-postgresql"],

"env": {
"ROOT_URL": {
"description": "URL of the installation",
"required": true,
"value": "https://yourlistmonk.herokuapp.com"
},
"LISTMONK_APP__ADMIN_USERNAME": {
"description": "Admin username",
"value": ""
"required": true
},
"LISTMONK_APP__ADMIN_PASSWORD": {
"description": "Admin password",
"value": ""
"required": true
}
},

Expand Down
5 changes: 5 additions & 0 deletions install-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ source ./env.sh

# Setup the listmonk DB.
./listmonk --install --yes

# Update the app's root URL.
psql $DATABASE_URL -c \
"UPDATE settings SET value='\"$ROOT_URL\"' WHERE key='app.root_url'; \
UPDATE settings SET value='\"$ROOT_URL/public/static/logo.png\"' WHERE key='app.logo_url';"

0 comments on commit ba36d0c

Please sign in to comment.