Hello everyone,
If you tried to host Squidex in Azure using the Instructions, you might have mixed feelings about Azure Hosting. Good, because it is easy and bad because Microsoft will charge you over 20€ / day for the Cosmos DB without any content.
I faced the same Issue and tried to Host Squidex in Azure without Cosmos and succeeded by following the Docker Instructions with some modifications, with monthly costs around 15€. Here is how it works
First of all you need to create a few Azure Resources. I will List the Resource and all mandatory configurations I changed. Everything else can stay the default value, except the Location, which should always be the same.
- Storage Account
- Resource Group: Create a new one, that you can use for all other resources as well.
- Account kind: Storage (general purpose v1) or StorageV2 (general purpose v2)
- App Service Plan
- Operating System: Linux
- Pricing Tier: Basic B1 or higher (to enable https)
- Web App - Basics
- Publish: Docker Image
- Operating System: Linux
- App Service Plan: Select the plan created before
- Web App - Docker
-
Options: Docker Compose (Preview)
-
Image Source: Docker Hub
-
Configuration File: Create a *.yml File with the following content
version: '2.1' services: squidex_mongo: image: mongo:latest ports: - "27017:27017" volumes: - etc-squidex-mongo-db:/data/db networks: - internal restart: unless-stopped squidex_squidex: image: "squidex/squidex:latest" ports: - "5000:80" environment: - URLS__ENFORCEHTTPS=true - EVENTSTORE__MONGODB__CONFIGURATION=mongodb://squidex_mongo - STORE__MONGODB__CONFIGURATION=mongodb://squidex_mongo depends_on: - squidex_mongo volumes: - etc-squidex-assets:/app/Assets networks: - internal restart: unless-stopped networks: internal: driver: bridge volumes: etc-squidex-mongo-db: etc-squidex-assets:
- Web App Configuration - Application settings
- your application settings should look like this
[
{
“name”: “DOCKER_REGISTRY_SERVER_URL”,
“value”: “https://index.docker.io”,
“slotSetting”: false
},
{
“name”: “IDENTITY__ADMINEMAIL”,
“value”: “”,
“slotSetting”: false
},
{
“name”: “IDENTITY__ADMINPASSWORD”,
“value”: “”,
“slotSetting”: false
},
{
“name”: “URLS__BASEURL”,
“value”: “”,
“slotSetting”: false
},
{
“name”: “VIRTUAL_HOST”,
“value”: “<web app url without https://>”,
“slotSetting”: false
},
{
“name”: “WEBSITE_HTTPLOGGING_RETENTION_DAYS”,
“value”: “10”,
“slotSetting”: false
},
{
“name”: “WEBSITES_ENABLE_APP_SERVICE_STORAGE”,
“value”: “false”,
“slotSetting”: false
}
]
- Web App Configuration - Path mappings
- Create a path mapping name etc-squidex-assets: mapped to the etc-squidex-assets file share created before
- Create a path mapping name etc-squidex-mongo-db: mapped to the etc-squidex-mongo-db file share created before
After that restart your web app and you should be done. Navigate to your web apps public Uri and login to squidex using your configured Admin settings.