Git Product home page Git Product logo

acs-app-box's Introduction

ACS app in a box

Deploy to Azure

Using pre-built image

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 to C:\docker-volumes\acs-app-box on your host. The container is using an SQLite database (file named ACSAppBox.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.

Local environment setup

Pre-requesites:

Local setup:

  1. In the src directory run: dotnet restore

  2. Add your ACS connection string secret:

    dotnet user-secrets set "ConnectionStrings:ACSConnectionString" "endpoint=...;accesskey=..."

  3. Run dotnet run --project ACSAppBox

  4. Navigate to https://localhost:7094/ - this will start the React dev server and redirect you to https://localhost:44431/ which hosts the website.

  5. Optional.

Local container build

We have some WIP functionality to build and run the app in a container locally.

  1. To build an image, in the src directory run:

    docker build -t acs-app-box .
  2. 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 of crmikhailfhl.azurecr.io/acs-app-box).

  3. Test the image by opening http://localhost:8080 and logging in with one of the predefined user accounts.

Seed data

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):

Sql Server Db

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

acs-app-box's People

Contributors

mbakalov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.