-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommandsDockerHeroku.txt
40 lines (31 loc) · 1.18 KB
/
commandsDockerHeroku.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#DEMO
https://web-api-netcore-22-mysql-free.herokuapp.com/api/BancoNacion/GetQuotes
#External Service
https://bna.com.ar/Mobile/CotizadorMobile
#DATABASE FREE CLOUD
https://www.freesqldatabase.com
#CLOUD API
https://heroku.com
#Tutorials
- https://dev.to/alrobilliard/deploying-net-core-to-heroku-1lfe
- https://medium.com/faun/deploy-dotnet-core-api-docker-container-with-mysql-on-heroku-ed387eab4222
- https://softchris.github.io/pages/dotnet-dockerize.html
#Requirements
- NET CORE 2.2
- MYSQL 5
- DOCKER
#Comprobar que anda Heroku CLI
heroku --version
heroku login
heroku container:login
#Crear docker image y correrlo local
docker build -t banco-nacion-webapi-mysql .
docker run -d -p 8080:80 --name abc banco-nacion-webapi-mysql
#Crear docker image para montarlo
docker build --pull -t banco-nacion-webapi-mysql .
#Asociar el docker image anterior con la app creada en heroku
docker tag banco-nacion-webapi-mysql registry.heroku.com/web-api-netcore-22-mysql-free/web
#Enviar docker image a la app
docker push registry.heroku.com/web-api-netcore-22-mysql-free/web
#Iniciar app con la imagen enviada
heroku container:release web -a web-api-netcore-22-mysql-free