Affix is a blog application built with .NET 6 and Angular 12. The app is containerized using Docker. Docker compose is used for orchestration when developing locally.
- Install Docker Desktop for the OS you're using.
- Trust / Import PFX files in Affix.ReverseProxy:
- api-local.pfx
- client-local.pfx
- is-local.pfx
- Add host entries:
- For Mac/Linux:
/etc/hosts - For Windows:
C:\Windows\system32\driver\etc\hosts
- For Mac/Linux:
127.0.0.1 local.is.affix.com
127.0.0.1 local.api.affix.com
127.0.0.1 local.client.affix.com
- Run the project using docker compose.
Affix can be easily deployed to AWS using CloudFormation. Whenever possible, resources from the AWS Free Tier are used. Note that some resources, such as a registered domain name, aren't included in the free tier and you're required to pay a respective fee.
To deploy Affix to AWS, follow the steps below:
-
Build the individual docker images for publishing:
docker build -f ./Affix.API/Dockerfile-Development -t DOCKER_ID/affix_api:latest .docker build -f ./Affix.IdentityServer/Dockerfile -t DOCKER_ID/affix_is:latest .docker build -f ./Affix.IdentityServer/Dockerfile-db -t DOCKER_ID/affix_is_db_migrate:latest .docker build -f ./Affix.API/Dockerfile-db -t DOCKER_ID/affix_api_db_migrate:latest .docker build -f ./Affix.Client/Dockerfile-Development -t DOCKER_ID/affix_client:latest .
-
Publish the docker images to a docker container registry:
docker push DOCKER_ID/affix_apidocker push DOCKER_ID/affix_isdocker push DOCKER_ID/affix_is_db_migratedocker push DOCKER_ID/affix_api_db_migratedocker push DOCKER_ID/affix_client
Note: in the commands above, DOCKER_ID stands for a docker id in Docker Hub. You can use any container registry of your choice. For example, you can use a private container registry such as AWS Elastic Container Registry. Applicable fees may apply for each individual container registry.