A simple restaurant recommendation system.
2.0K
A simple restaurant recommendation system.
This project helped me transition my AWS knowledge to Azure, which I've written about in the JOURNEY.md file.

brew install make azure-cli
# PowerShell as Administrator
choco -y install make azure-cli
One-time setup steps to prepare the environment.
env to .env and update the values
cp env .env
make azure-login
make azure-remote-state-init
This setup creates an Azure Service Principal so GitHub Actions can authenticate with Azure.
Login to Azure
make azure-login
List available subscriptions
make azure-service-principal-list
Sample output
Name CloudName SubscriptionId TenantId State IsDefault
------------- ----------- ------------------------------------ ------------------------------------ ------- -----------
Pay-As-You-Go AzureCloud 00000000-0000-0000-0000-000000000000 12345678-0000-0000-0000-000000000000 Enabled True
Copy SubscriptionId and set it in .env
SUBSCRIPTION_ID=00000000-0000-0000-0000-000000000000
Create the Service Principal
make azure-service-principal-create
Copy the output JSON and save it in a safe place
The app is now ready to be deployed with GitHub Actions to Azure
Login to Azure
make azure-login
Initialize Terraform
make infra-init
Modify the infrastructure
Plan the infra
make infra-plan
Apply the infra
make infra-apply
NOTE: For the first time, it will probably fail due to missing TXT record in Cloudflare. Add the TXT record to Cloudflare and make infra-plan followed by make infra-apply again.
Cloudflare is used to protect the website with a custom password. The site is accessible only by users with the custom password in the header. If you wish to strengthen the security, you can add more rules to the WAF, like "Rate Limiting".
Cloudflare requires a one-time setup, which should be done after deploying the infrastructure for the first time, as it relies on the output of the infrastructure deployment.
This step is required to route traffic from Cloudflare to the Azure app.
CNAMErestrorestro-{random_integer}.azurewebsites.net (output of infra)AutoProxiedCheck assets/cloudflare.dns.png to see what it should look like on Cloudflare.
This step is optional, as it protects the app with a custom password in the header. I do recommend adding it to avoid unwanted access to the app.
restro.meirg.co.il with your domain, my-custom-header-name with your custom header name, and my_cuStOm_passw0rd with your custom password.
(http.host eq "restro.meirg.co.il" and all(http.request.headers["my-custom-header-name"][*] ne "my_cuStOm_passw0rd"))
This section is about building and deploying the backend application to Azure.
make azure-login
make backend-build
make backend-push
make backend-deploy
make backend-prepare
make backend-install
make services-up
make backend-run
Created and maintained by Meir Gabay
This project is licensed under the MIT License - see the LICENSE file for details
Content type
Image
Digest
sha256:00396066f…
Size
28.5 MB
Last updated
over 2 years ago
docker pull unfor19/restro