Forslagsløsning for fylkestinget
3.8K
Forslagsløsning for fylkestinget
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
| Setting | value |
|---|---|
| Name | Your app name |
| Application type | Web app / API |
| Sign-on URL | https://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
You will need an S3 bucket on AWS to persist GUN in production.
Follow this guide
For development you can persist to file.
Nodejs >= 8.9.4 and npm must be installed.
git clone https://github.com/telemark/fylkestinget-web
cd fylkestinget-web
npm i
See next.config.js
vim next.config.js
npm start
See production.env
docker run -d \
-p 80:3000 \
-p 443:3000 \
--env-file production.env \
--name fylkestinget-web \
telemark/fylkestinget-web
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

Content type
Image
Digest
Size
146.2 MB
Last updated
over 6 years ago
docker pull telemark/fylkestinget-web