How to: Host Squidex in Azure without CosmosDB

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.

  1. 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)
  1. App Service Plan
  • Operating System: Linux
  • Pricing Tier: Basic B1 or higher (to enable https)
  1. Web App - Basics
  • Publish: Docker Image
  • Operating System: Linux
  • App Service Plan: Select the plan created before
  1. 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:
    
  1. 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
}
]

  1. 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.

Hi,

that’s awesome. Thanks a lot for your contribution. Would you create a PR for the docs:

@Sebastian sure thing. I will setup the environment one more time for our Staging and create some screenshots in the process. I will create a PR for that when I am done.

1 Like

Hello, I tried this method on Azure but I can’t login to squidex, I set the IDENTITY__ADMINEMAIL and IDENTITY__ADMINPASSWORD Environment variables, but none of them worked. It tell’s me I can’t login

Have you checked the logs? Perhaps your password is not secure enough.