Skip to content

A proof of concept that an ASP.NET web application with multiple relational databases can be continuously integrated and deployed to Heroku!

License

Notifications You must be signed in to change notification settings

jeremymaya/herokufy-more

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

herokufy-more

Actions Status
Actions Status

Author: Kyungrae Kim

Endpoint: https://herokufy-more.herokuapp.com


Description

This is a further proof of concept that an ASP.NET web application with multiple relational databases can be continuously integrated and deployed to Heroku by combining the power of Docker and GitHub Actions.

This repository showcases a more complicated ASP.NET web application deployment scenario compared to Herokufy Dotnet by adding a second database seeded with a Admin account using ASP.NET Identity.

The below is the Admin account login information for demo purpose:

Email: admin@email.com
Password: ReallyStrongPassword1234!

What Differs

Pay close attention to Dockerfile and deployment.yml!

Dockerfile

The variable defined as ARG in Dockerfile is only available during the build-time. In order to access other variables throughout the application, those variables need to be defined as ENV. However, Heroku does NOT support the --env option. Therefore, we need to define an ENV variable that references an ARG.

For example:

ARG ADMIN_EMAIL
ARG ADMIN_PASSWORD
ENV ADMIN_EMAIL_ENV=$ADMIN_EMAIL
ENV ADMIN_PASSWORD_ENV=$ADMIN_PASSWORD

Workflow

In order to pass multiple variables from GitHub Secrets, separate each variables with a ,.

--arg ADMIN_EMAIL=${{ secrets.ADMIN_EMAIL }},ADMIN_PASSWORD=${{ secrets.ADMIN_PASSWORD }}

Credits