Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Aphorismen
Applications
Business Economics & Admin.
My Computers
Cooking
Devices
Folders
Food
Hardware
Infos
Software Development
Sports
Operation Instructions
Todos
Test
Help
Glossary
Community portal
adaptions
Sidebar anpassen
Wiki RB4
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Heroku
(section)
Page
Discussion
English
Read
Edit
View history
Toolbox
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Example== ===Official Tutorial=== * from [https://devcenter.heroku.com/articles/getting-started-with-python official python tutorial] PS C:\Temp\python-getting-started> heroku login * clone example * create app and push code * start the app PS C:\Temp\python-getting-started> heroku ps:scale web=1 Scaling dynos... done, now running web at 1:Free PS C:\Temp\python-getting-started> heroku open // opens https://arcane-peak-78109.herokuapp.com/ * open the [https://dashboard.heroku.com/apps dashboard] * stop it or scale it down to 0 heroku ps:scale web=0 * prepare for running locally PS C:\Temp\python-getting-started> python -m venv venv PS C:\Temp\python-getting-started> .\venv\Scripts\activate (venv) PS C:\Temp\python-getting-started> pip install -r .\requirements.txt * run it locally (venv) PS C:\Temp\python-getting-started> python manage.py collectstatic (venv) PS C:\Temp\python-getting-started> heroku local -f .\Procfile.windows * open it http://localhost:5000/ ===Spring Boot Demo=== ====Configuration for Heroku==== * steps from [https://devcenter.heroku.com/articles/deploying-spring-boot-apps-to-heroku offical Spring Boot tutorial] * create demo1 application in <code>C:\Uwes\Programme\eclipse\workspace\demo1</code> and git it * see SpringBoot.docx * When deploying an app, Heroku reads <code>pom.xml</code> file and installs the dependencies by running <code>mvn clean install</code>. * check DB connection by C:\Uwes\Programme\PostgreSQL\12\bin> .\[[Postgres#Operation|psql]] -h ec2-3-230-122-20.compute-1.amazonaws.com -U cepxizounlueue defpfuas3qslld * set specific configurations for Heroku by adding profile <code>heroku</code> to <code>pom.xml</code> and set config var <code>MAVEN_CUSTOM_OPTS</code> to <code>-P !local_dev,heroku</code> ====Run on Heroku==== git push heroku master heroku open // opens the application https://intense-caverns-96515.herokuapp.com/ in a browser ====Prepare Locally Heroku==== * create Procfile <code>Procfile.windows</code> for running locally with command to start the Spring application <code>java -jar target/demo1-0.0.1-SNAPSHOT.jar</code> * compile and build a JAR, with dependencies, placing it into your application’s target directory. The <code>spring-boot-maven-plugin</code> in the <code>pom.xml</code> provides this process mvn install * create local DB C:\Uwes\Programme\xampp7.2.27\mysql\bin\mysql --user=root --password=mHalloo0@1m create database demo1; * create <code>C:\Uwes\eclipse\workspace_2020-12\SpringBoot\demo1\set_local_dev.bat</code> * add profile local_dev to <code>pom.xml</code> ====Run Heroku Locally==== * run the application set_local_dev.bat // start eclipse by start_eclipse.bat from shell and run it or heroku local -f Procfile.windows ====Run Eclipse Locally==== * see <code>src\main\resources\application.properties</code> which is not in Git repository * start eclipse
Summary:
Please note that all contributions to Wiki RB4 may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Uwe Heuer Wiki New:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width