Skip to content

Latest commit

 

History

History
104 lines (73 loc) · 2.52 KB

README.md

File metadata and controls

104 lines (73 loc) · 2.52 KB

Les Projets Cagnottes - web

Release Integration

Prerequisites

Build

Build with Angular CLI

With Angular CLI, you can build the app only :

npm install
ng build

Build the Docker image

With Docker, you can build the image :

docker build . --build-arg configuration=production

Run

Run locally in development

With Angular CLI, you can run a dev server :

npm install
ng serve

Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Debug locally in production mode

Build in production mode

npm run ng build -- --configuration production --output-path=dist

Run a debug HTTPS server with certificates

Update the file src/assets/config.json with an HTTP URL :

{
    "webUrl": "https://localhost:4200"
}

Then run the following commands :

npm i -g mkcert angular-http-server
mkcert create-ca
mkcert create-cert
angular-http-server --path dist/fr --https --cert cert.crt --key cert.key -p 4200

Run with Docker

On your host, create a config.json file with the following content :

{
    "webUrl": "http://localhost:4200",
    "apiUrl": "http://localhost:8080/api",
    "slackEnabled": true,
    "slackClientId": "1267900044419.1280463132273",
    "microsoftEnabled": true,
    "microsoftTenantId": "ab8f3573-a42c-4b8b-a615-f03fd683bbbd",
    "microsoftClientId": "08a651e0-9f49-4984-9834-2ad26a490f86"
}

Then, run the command :

docker run -d --name web \
  -p 80:80 \
  -e PORT="80" \
  -v <YOUR_HOST_DIRECTORY>/config.json:/usr/share/nginx/html/assets/config.json \
  lesprojetscagnottes/web:<tag>

Configuration of Microsoft Auth

Configure the App Registration with the following Authentication :