We've published a pre-built Docker image that you can pull and run locally quickly.
Pull:
docker pull crmikhailfhl.azurecr.io/acs-app-box
Run:
docker run `
-p 8080:80 `
-e ConnectionStrings__ACSConnectionString="<YOUR_ACS_CONNECTION_STRING>" `
-v C:\docker-volumes\acs-app-box:/home/ `
crmikhailfhl.azurecr.io/acs-app-box
-
-p 8080:80
maps your local http://localhost:8080 to the port 80 that the app is running on inside the container, -
-e ConnectionStrings__ACSConnectionString="<YOUR_ACS_CONNECTION_STRING>"
passes the ACS Connection String as an environment variable to the container, -
-v C:\docker-volumes\acs-app-box:/home/
maps the/home/
directory inside the container toC:\docker-volumes\acs-app-box
on your host. The container is using an SQLite database (file namedACSAppBox.db
) that is stored in/home/
in the container. Map this to something on your host so that the data survives container restarts.
Access the image by opening http://localhost:8080 and logging in with one of the predefined user accounts.
Pre-requesites:
-
.net 6 SDK
-
dotnet ef
tool. Install by doingdotnet tool install --global dotnet-ef
Link for details -
(optional) Docker Desktop
Local setup:
-
In the
src
directory run:dotnet restore
-
Add your ACS connection string secret:
dotnet user-secrets set "ConnectionStrings:ACSConnectionString" "endpoint=...;accesskey=..."
-
Run
dotnet run --project ACSAppBox
-
Navigate to https://localhost:7094/ - this will start the React dev server and redirect you to https://localhost:44431/ which hosts the website.
-
Optional.
We have some WIP functionality to build and run the app in a container locally.
-
To build an image, in the
src
directory run:docker build -t acs-app-box .
-
To run the image: use the same command as in the Using pre-built image section, except the container name should be just
acs-app-box
(instead ofcrmikhailfhl.azurecr.io/acs-app-box
). -
Test the image by opening http://localhost:8080 and logging in with one of the predefined user accounts.
Whenever the app starts for the first time, it will create/migrade the
database (located in the ACSAppBox.db
SQLite file) with dummy data.
User accounts (all with Pass123$
as password):
By default the app uses an SQLite database, but it is possible to use SQL Server instead:
-
Add a ConnectionString key called
SqlServerConnectionString
-
Add a top-level config key
Provider
and set it to "SqlServer
"-
Alternatively, run the app passing
Provider
value via command line:dotnet run --project ACSAppBox -- --provider SqlServer
-