Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion doc/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ How It Works

The backend is using Azure Functions and Azure Table Storable this page will explains how they work together in this tool.

![Global Diagram](../images/global_diagram_idea_v3b.jpg)
![Global Diagram](assets/global_diagram_idea_v3b.jpg)

## Azure Functions

Expand Down
2 changes: 1 addition & 1 deletion doc/how-to-add-custom-domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ From the Azure Portal, Open the Azure COntainer Apps named `azfunc-light`. This

From the left menu, select **Custom domains** and click on **Add custom domain**.

![Add custom domain](../images/add-custom-domain.png)
![Add custom domain](assets/add-custom-domain.png)

Follow the instructions to add your custom domain. Note that it may takes a few minutes for the domain to all be setup. Once it is, you should see the domain listed in the custom domains list withthe green check mark.

Expand Down
12 changes: 6 additions & 6 deletions doc/how-to-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@

> To Fork GitHub repository click on the Fork button on the top right of the screen.

![Click on the button Fork](../images/click-fork.png)
![Click on the button Fork](assets/click-fork.png)

Provide a name. It can be anything, it just needs to be unique in your account (you can keep AzUrlShortener if you want). Add a description it you want and click the button **Create repository from template**.

![Give it a name description and click Create](../images/fork-details.png)
![Give it a name description and click Create](assets/fork-details.png)

After a few seconds, you should now be in your version of the AzUrlShortener project. If you need more detail have a look to this GitHub doc: [Fork a repo](https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/fork-a-repo).

> Make sure you are currently in YOUR GitHub repository.
>
>![This should be YOUR repo](../images/your-account.png)
>![This should be YOUR repo](assets/your-account.png)


## Prerequisites
Expand Down Expand Up @@ -63,17 +63,17 @@ After a few seconds, you should now be in your version of the AzUrlShortener pro

After the deployment is complete, you will see the URLs of your applications in the terminal; the one starting by `https://admin` is the admin tools (aka TinyBlazorAdmin), and the one starting with `https://azfunc-light` is the redicrect service. There is also many details about the resources created in Azure, and a link to the Aspire dashboard.

![azd deployment result](../images/deployment-result.png)
![azd deployment result](assets/deployment-result.png)

## Add authentication to the admin website

The app is now deployed, but it does not have authentication enabled. Navigate to the [Azure Portal](https://portal.azure.com/), and find the Resource Group you just deployed (e.g., rg-azUrl-dev). From there, select the Container App named **admin**.

![select the Container App admin](../images/select-admin-container-app.png)
![select the Container App admin](assets/select-admin-container-app.png)

From the left menu, select **Authentication** and click **Add identity provider**.

![select Authentication](../images/auth-and-provider.png)
![select Authentication](assets/auth-and-provider.png)

You can choose between multiple providers, but let's use Microsoft since it's deployed in Azure and you are already logged in. Once Microsoft is chosen, you will see many configuration options. Select the recommended client secret expiration (e.g., 180 days).

Expand Down
4 changes: 2 additions & 2 deletions doc/how-to-migrate-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You need to export to CSV the following tables:

The best settings to export when planning to import using the TinyBlazorAdmin are:

![export_settings](../images/export_settings.png)
![export_settings](assets/export_settings.png)

To import the data use the Import button in the Settings page.

Expand All @@ -25,4 +25,4 @@ Here are the settings to use when importing using Azure Storage Explorer:
- You need to select the data type for each column.
- Uncheck the checkbox *Ignore empty string values*.

![Import settings when using Azure Storage Explorer](../images/import_using_azStorage-explorer.png)
![Import settings when using Azure Storage Explorer](assets/import_using_azStorage-explorer.png)
36 changes: 18 additions & 18 deletions doc/how-to-set-api-public.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# How to make the api public
When the solution is running locally the API is accessible so you can call it from different tools, but once deploy in Azure the API doesn't have public endpoints. This was done for security purposes, where only the other resources from the same Container Apps Environment have access. If you would like to change this it's possible to do it pre or post deployment.
> **Note:** The API is not password protected, so anyone with the URL can use it.
## Before deployment
In the `src\AppHost` project open the `program.cs` file and uncomment the line
![Uncomment this line](../images/uncomment-public-endpoints.png)
Deploy, or re-deploy with `az up`.
## After deployment
If you would like to make the endpoints public this can be done via the Azure Portal. From the Azure Container App `api`, click on `Ingress` in the Settings section on the left panel. Then change the `Ingress traffic` to **Accepting traffic from anywhere**
![change the ingress](../images/public-ingress.png)
# How to make the api public

When the solution is running locally the API is accessible so you can call it from different tools, but once deploy in Azure the API doesn't have public endpoints. This was done for security purposes, where only the other resources from the same Container Apps Environment have access. If you would like to change this it's possible to do it pre or post deployment.

> **Note:** The API is not password protected, so anyone with the URL can use it.

## Before deployment
In the `src\AppHost` project open the `program.cs` file and uncomment the line

![Uncomment this line](assets/uncomment-public-endpoints.png)

Deploy, or re-deploy with `az up`.


## After deployment
If you would like to make the endpoints public this can be done via the Azure Portal. From the Azure Container App `api`, click on `Ingress` in the Settings section on the left panel. Then change the `Ingress traffic` to **Accepting traffic from anywhere**

![change the ingress](assets/public-ingress.png)
8 changes: 4 additions & 4 deletions doc/how-to-use-azure-storage-explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ Azure Storage Explorer is a free tool to manage your Azure cloud storage resourc

Once installed, you need to configure it to access your Azure account. You can do this by clicking on the Open connection dialog the **DC plug** icon in the top left corner, then select the Azure Subscription option.

![Azure Storage Explorer, Open connection dialog](../images/storageexplorer-selectresource.png)
![Azure Storage Explorer, Open connection dialog](assets/storageexplorer-selectresource.png)

And follow the steps to login to your Azure account.

## Find the URLs Storage table

To find the table where the URLs data is saved, expend your subscription (with the key icon) in the tree view. Expand the Storage accounts, your account (probably starting by 'shortenertool' and ending with 'sa'), tables, and finally look for. `UrlsDetails`

![Finding the UrlsDetails table in Azure Storage Explorer](../images/storageexplorer-tree.png)
![Finding the UrlsDetails table in Azure Storage Explorer](assets/storageexplorer-tree.png)

Pro tip: You can right-click on the table and select `Pin to Quick Access` to create a shortcut to it.

## Create a new Short URL

To create a new URL, make sure the `UrlsDetails` table is selected (directly or using the quick access), then click on the **+ Add** button in the top menu.

![Creating a new URL in Azure Storage Explorer](../images/storageexplorer-addentry.png)
![Creating a new URL in Azure Storage Explorer](assets/storageexplorer-addentry.png)

The *Add Entity* dialog window will open, You will need to fill it in order to create the URL.

Expand All @@ -38,7 +38,7 @@ Once you are done, click on the **Insert** button. Congratulations, you have cre

First, we need to search for the URL that we want to edit, and we do this by executing a query.

![Execute a query in Azure Storage Explorer](../images/storageexplorer-updateexisting.png)
![Execute a query in Azure Storage Explorer](assets/storageexplorer-updateexisting.png)

Click on the `Query` button in the top menu. Now depending on the information, you have changed the search parameters.

Expand Down
Loading