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.
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:
- 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_USER: [email protected]
- 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.