Sign inSign up

telemark/fylkestinget-web

By telemark

•Updated almost 6 years ago

Forslagsløsning for fylkestinget

Image
0

3.9K

telemark/fylkestinget-web repository overview

Build Status js-standard-style

⁠fylkestinget-web

Forslagsløsning for fylkestinget

⁠Azure authentication setup

Sign in to the Azure portal⁠

In the left-hand navigation pane go to Azure Active Directory -> App registrations -> New application registration and register the app with following settings

Settingvalue
NameYour app name
Application typeWeb app / API
Sign-on URLhttps://your-domain.com/api/callback⁠

Go to Settings -> Keys in your registered app and type inn a Key description and value.

Go to Settings -> Required permissions in your registered app and add "Microsoft Graph" and choose the permission Read all users' full profiles. Add the same permission under Windows Azure Active Directory. Then click Grant Permissions

Follow the link after "Managed application in local directory" in your registered app and Users and groups, click Add user and add user(s) you want to grant access to the app.

See microsoft docs⁠

⁠S3 setup

You will need an S3 bucket on AWS⁠ to persist GUN⁠ in production.

Follow this guide⁠

For development you can persist to file.

⁠Installation alternatives

⁠1. Run on host

⁠Install

Nodejs >= 8.9.4 and npm must be installed.

git clone https://github.com/telemark/fylkestinget-web
cd fylkestinget-web
npm i
⁠Edit config

See next.config.js⁠

vim next.config.js
⁠Start fylkestinget-web
npm start

⁠2. Run from docker hub

⁠Edit config

See production.env⁠

⁠Start fylkestinget-web
docker run -d \
  -p 80:3000 \
  -p 443:3000 \
  --env-file production.env \
  --name fylkestinget-web \
  telemark/fylkestinget-web

⁠3. Deploy to Now⁠

⁠Set secrets

For azure auth

now secrets add fylkestinget_moa_domain <your-configured-domain.com>
now secrets add fylkestinget_moa_tenant_id <your-tenant-id.onmicrosoft.com>
now secrets add fylkestinget_moa_client_id <your-client-id>
now secrets add fylkestinget_moa_client_secret <your-client-secret>
now secrets add fylkestinget_session_key <a-random-session-key>

For S3

now secrets add fylkestinget_aws_access_key_id <your-access-key-id>
now secrets add fylkestinget_aws_secret_access_key <your-access-key>
now secrets add fylkestinget_aws_s3_bucket <your-bucket>

Deploy to now

wget https://raw.githubusercontent.com/telemark/fylkestinget-web/master/production.env
now -E production.env https://github.com/telemark/fylkestinget-web
now alias fylkestinget-web-example-ykaxwfgdoy.now.sh your-configured-domain.com

⁠Screenshot

Screenshot

⁠License

MIT⁠

Tag summary

Content type

Image

Digest

Size

146.2 MB

Last updated

over 6 years ago

docker pull telemark/fylkestinget-web