Skip to content
This repository has been archived by the owner on Jun 6, 2020. It is now read-only.

Deploy to heroku #3

Merged
merged 4 commits into from
Feb 19, 2019
Merged

Deploy to heroku #3

merged 4 commits into from
Feb 19, 2019

Conversation

chaspy
Copy link
Owner

@chaspy chaspy commented Feb 16, 2019

ref: #2

What I did

Add postgress add-on

$ heroku addons:create heroku-postgresql:hobby-dev

ref: https://elements.heroku.com/addons/heroku-postgresql

Change database at production(heroku)

By using django-heroku
bd1f7db
05faf9f

If $DATABASE_URL exists, it is automatically replace the setting.
ref: https://devcenter.heroku.com/articles/django-app-configuration#settings-py-changes
ref: https://github.com/heroku/django-heroku/blob/v0.3.0/django_heroku/core.py#L65-L69

$ DATABASE_URL was added as config var when installed postgress add-ons.
You can see this value by heroku config

Deploy to heroku

$ heroku login
$ heroku git:remote -a askpy
$ git push heroku master

I've already pushed to heroku:master. application is working fine! https://askpy.herokuapp.com

@ariririri
Please review and merge

This was referenced Feb 16, 2019
@takegawahiroto
Copy link

thanks @chaspy to your fast development.

this repository doesn't work well in my local environment.
image

@chaspy
Copy link
Owner Author

chaspy commented Feb 19, 2019

@takegawahiroto
Please recreate image.

diff --git a/run.sh b/run.sh
index a51fa86..a1e5ae1 100755
--- a/run.sh
+++ b/run.sh
@@ -1,4 +1,4 @@
 #!/bin/bash
 set -x

-docker-compose up --force-recreate
+docker-compose up --build --force-recreate

@ariririri ariririri merged commit bf4857e into master Feb 19, 2019
@ghost ghost deleted the deploy-to-heroku branch February 19, 2019 01:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants