This message was deleted.
s
This message was deleted.
p
@boundless-library-86481 I don’t define
kind
on the
WebApp
, this is what I do:
Copy code
const plan = new web.AppServicePlan(`${environment}-plan`, {
  name: `${environment}-plan`,
  resourceGroupName: resourceGroup.name,
  location: resourceGroup.location,
  kind: "Linux",
  reserved: true,
  sku: {
    name: "P1v2",
    tier: "PremiumV2",
    capacity: 1,
  },
});

const app = new web.WebApp(`${environment}-app`, {
  name: `${environment}-app`,
  location: resourceGroup.location,
  resourceGroupName: resourceGroup.name,
  serverFarmId: plan.id,
  httpsOnly: true,
  identity: {
    type: "SystemAssigned",
  },
  siteConfig: {
    alwaysOn: true,
    linuxFxVersion: pulumi.interpolate`DOCKER|${batchDockerImage}`,
    healthCheckPath: healthCheckPath,
    appSettings: [
      {
        name: "WEBSITES_PORT",
        value: "9090",
      },
      {
        name: "WEBSITES_ENABLE_APP_SERVICE_STORAGE",
        value: "false",
      },
      {
        name: "DOCKER_REGISTRY_SERVER_URL",
        value: dockerRegistryServerUrl,
      },
      {
        name: "DOCKER_REGISTRY_SERVER_USERNAME",
        value: dockerRegistryServerUsername,
      },
      {
        name: "DOCKER_REGISTRY_SERVER_PASSWORD",
        value: dockerRegistryServerPassword,
      }
    ],
  },
  tags: {
    environment: environment,
  },
});
…it TS, but I guess you get the idea…
b
I see but this is using the azure provider not the azure-nextgen one.
I also would like to do something a bit different
I want to push the image after I create the web app
this requires the mage to be pushed already right?
p
@boundless-library-86481 it is using the nextgen provider, this is the import I use:
Copy code
import * as web from "@pulumi/azure-nextgen/web/latest";
yes, the Image has to be pushed to the registry already (e.g. ACR)
I’m using the same approach to deploy a docker-compose file