Author: Kyungrae Kim
Endpoint: https://herokufy-more.herokuapp.com
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!
Pay close attention to Dockerfile
and deployment.yml
!
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
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 }}