title | description | published | date | tags | editor | dateCreated |
---|---|---|---|---|---|---|
Azure Web App |
Installation Guide |
true |
2023-09-01 02:32:54 UTC |
setup, guide |
markdown |
2019-05-31 22:40:09 UTC |
This guide was contributed by the community and may be incomplete or become outdated. {.is-warning}
This guide details the step-by-step procedure to install Wiki.js on an Azure Web App with an Azure Database for PostgreSQL.
We'll first create the database for our wiki.
While it's possible to host the database alongside the application on the Azure Web App, this is not recommended as it will impact performance and is not scalable.
- Create a new resource, search for Azure Database for PostgreSQL and click Create.
- Select Single server
- Fill in the server details.
- You must select a version of 9.6 or later.
- The minimum server size is Basic with 1 vCore, however you cannot upgrade to General Purpose afterwards if you choose Basic.
- Finish by creating the resource.
- Once the resource is created, navigate to Connection security.
- Enable Allow access to Azure services so that your Azure Web App is able to access your DB.
- Click on Add client IP to add your own IP address to the whitelist.
- Click Save and wait for changes to be applied.
🚦 This guide assumes the DB will be dedicated to the wiki. If you plan on sharing the DB with other applications, you should connect to the server and create a dedicated user + database. {.is-warning}
We can now create the App Service where our wiki will run.
- Create a new resource, search for Web App and click Create.
- Fill in the instance details.
- Select Docker Image for Publish type.
- Select Linux for Operating System.
- The minimum App Service Plan size is B1. Consider selecting at least P1V2 for production scenarios.
- Click Next: Docker
- Set the following options:
- Single Container
- Image Source: Docker Hub
- Access Type: Public
- Image and Tag:
requarks/wiki:2
- Click Review and create (other steps are optional).
- Once the resource is created, navigate to Configuration.
- Add the following Application Settings: (replace
xyz
with values you entered when creating the DB earlier)DB_TYPE: postgres DB_HOST: xyz.postgres.database.azure.com DB_PORT: 5432 DB_NAME: postgres DB_USER: xyz@xyz DB_PASS: xyz DB_SSL: true
- Click Save to apply the configuration.
- Navigate to the Overview tab and click Restart.
- Wait for the container to be ready. You can monitor the app status in the Container settings tab, using the Logs window. A message similar to
Container xyz_0 for site xyz initialized successfully and is ready to serve requests.
should be logged.
- Browse to your app public URL. (Can be found in the Overview tab of your web app resource)
- Follow the instructions to create the admin account and start using your wiki.
Enabling App Service Authentication in Azure might cause Request Header Fields Too Large
errors.
To fix this:
- In your Azure Web App, navigate to Configuration.
- Add the following Application Settings:
WEBSITE_AUTH_DISABLE_IDENTITY_FLOW: true
The issue can re-appear for graphql queries when enabling SAML 2.0 authentication in Wiki.js, even with above fix.
To solve that we need to increase the max header size for NodeJS.
- In your Azure Web App, navigate to Configuration.
- Add the following Application Settings:
NODE_OPTIONS: --max-http-header-size=81920