Overview
Hi all, encountered an issue when deploying azure container to web app.
Opening the deployment centre, I define necessary information and hit save. When hitting save I am returned the error message 'Failed to save configuration: The parameter windowsfxversion has invalid value'.
To my understanding, this implies that I am hardcoding the windows version in the container, though I have checked and this is untrue.
What I am actually trying to do
I have two separate containers that include the front and back end code for a product. The code is correct for each.
The backend is Python code uses Pinecone API (vector database), OpenAi API, and a website URL. fully functioning - returns output as expected.
The frontend is HTML, submitting user input to backend and retrieving response. fully functioning.
Replication
Dockerfile - building image
backend
FROM python:3.8 WORKDIR /app COPY
backend.py /app/
COPY requirements.txt /app/
RUN pip install -r requirements.txt
EXPOSE 80
ENV MY_ENV_VAR=my_value
CMD ["python", "backend.py"]
PS C:\Users\user> cd path\to\file
PS C:\Users\user\path\to\file> docker build -t frontend .
backend
FROM nginx:alpine
COPY . /usr/share/nginx/html
PS C:\Users\user> cd path\to\file
PS C:\Users\user\path\to\file> docker build -t frontend .
Pushing to azure:
backend:
PS C:\Users\user> docker login azureregistry.azurecr.io
PS C:\Users\user> docker tag backend:latest azureregistry.azurecr.io/backend
PS C:\Users\user> docker push ultimateregistry.azurecr.io/backend
frontend:
PS C:\Users\user> docker login azureregistry.azurecr.io
PS C:\Users\user> docker tag frontend:latest azureregistry.azurecr.io/frontend
PS C:\Users\user> docker push ultimateregistry.azurecr.io/frontend
At this point both containers are in azure container registry. from here I build web app:
application settings added:
BACKEND_STARTUP
FRONTEND_STARTUP
DOCKER_ENABLE_CI
DOCKER_REGISTRY_SERVER_PASSWORD
DOCKER_REGISTR_SERVER_URL
DOCKER_REGISTRY_SERVER_USERNAME
IMAGE_BACKEND
IMAGE_FRONTEND
WEBSITES_ENABLE_APP_SERVICE_STORAGE
I then open the deployment centre for the app and specify the following:
container type = single container
Registry source = azure container registry
subscription = subscription
authentication = admin credentials
registry = registry
image = image
tag = tag
startup file or command = FRONTEND_STARTUP
continuos deployment = on
The issue appears...
after hitting save I am returned the angry error message provided:
Not very fun looking.
Logs
dont know how helpful this is but feels like it should be provided.
2023_10_31_XN1SDWK00001S_platform.log:
31/10/2023 10:29:44.148 INFO - Site: ultimateapp1 - Environment variables changed. Container restart required.
31/10/2023 10:29:44.148 INFO - Site: ultimateapp1 - Recycle container.
31/10/2023 10:29:44.148 INFO - Site: ultimateapp1 - Overlap restarting container.
31/10/2023 10:29:44.336 INFO - Site: ultimateapp1 - Creating container image
31/10/2023 10:29:44.383 INFO - Site: ultimateapp1 - Verifying container image and pull image if necesary
31/10/2023 10:29:44.383 INFO - Site: ultimateapp1 - Pulling container image: mcr.microsoft.com/azure-app-service/windows/parkingpage:latest. AuthType: UserName
31/10/2023 10:29:45.011 INFO - Site: ultimateapp1 - Image: mcr.microsoft.com/azure-app-service/windows/parkingpage:latest
Status: latest Pulling from azure-app-service/windows/parkingpage
31/10/2023 10:29:45.042 INFO - Site: ultimateapp1 - Image: mcr.microsoft.com/azure-app-service/windows/parkingpage:latest
Status: Digest: sha256:430f6a08e36d73166658d8522f1e8f626a3139124f0f151a2028aceca810ced7
31/10/2023 10:29:45.058 INFO - Site: ultimateapp1 - Image: mcr.microsoft.com/azure-app-service/windows/parkingpage:latest
Status: Status: Image is up to date for mcr.microsoft.com/azure-app-service/windows/parkingpage:latest
31/10/2023 10:29:45.293 INFO - Site: ultimateapp1 - Attempting to create container
31/10/2023 10:29:45.293 INFO - Site: ultimateapp1 - Creating container for image: mcr.microsoft.com/azure-app-service/windows/parkingpage:latest.
31/10/2023 10:29:45.482 INFO - Site: ultimateapp1 - [bc3e721eae579e5fc75d92b6f5cf23099ce0ea983b6d8038fec1acdd24ad4ecf] - Create container for image: mcr.microsoft.com/azure-app-service/windows/parkingpage:latest succeeded. Container Id bc3e721eae579e5fc75d92b6f5cf23099ce0ea983b6d8038fec1acdd24ad4ecf
31/10/2023 10:29:45.482 INFO - Site: ultimateapp1 - [bc3e721eae579e5fc75d92b6f5cf23099ce0ea983b6d8038fec1acdd24ad4ecf] - Attempting to start container. Container memory limit: 1024 MB. For more information, refer https://aka.ms/configurecontainer.
31/10/2023 10:29:51.953 INFO - Site: ultimateapp1 - [bc3e721eae579e5fc75d92b6f5cf23099ce0ea983b6d8038fec1acdd24ad4ecf] - Start container succeeded.
31/10/2023 10:30:03.278 INFO - Site: ultimateapp1 - [bc3e721eae579e5fc75d92b6f5cf23099ce0ea983b6d8038fec1acdd24ad4ecf] - Container has started.
31/10/2023 10:30:03.278 INFO - Site: ultimateapp1 - [bc3e721eae579e5fc75d92b6f5cf23099ce0ea983b6d8038fec1acdd24ad4ecf] - Customizing the container
31/10/2023 10:30:06.520 INFO - Site: ultimateapp1 - [bc3e721eae579e5fc75d92b6f5cf23099ce0ea983b6d8038fec1acdd24ad4ecf] - Container customization has completed successfully
31/10/2023 10:30:06.551 INFO - Site: ultimateapp1 - [bc3e721eae579e5fc75d92b6f5cf23099ce0ea983b6d8038fec1acdd24ad4ecf] - Container has started.
31/10/2023 10:30:08.130 INFO - Site: ultimateapp1 - [bc3e721eae579e5fc75d92b6f5cf23099ce0ea983b6d8038fec1acdd24ad4ecf] - Container entrypoint has started
31/10/2023 10:30:16.661 INFO - Site: ultimateapp1 - [bc3e721eae579e5fc75d92b6f5cf23099ce0ea983b6d8038fec1acdd24ad4ecf] - Container is ready
31/10/2023 10:30:16.680 INFO - Site: ultimateapp1 - [bc3e721eae579e5fc75d92b6f5cf23099ce0ea983b6d8038fec1acdd24ad4ecf] - Container start-up and configuration completed successfully
31/10/2023 10:30:16.680 INFO - Site: ultimateapp1 - Swapping active container.
31/10/2023 10:30:16.680 INFO - Site: ultimateapp1 - [1048bb9e1e6c5fe24df0ef6f91cb22e994e32a9ff051138e1dd602aff2eb4c51] - Attempting to stop container: 1048bb9e1e6c5fe24df0ef6f91cb22e994e32a9ff051138e1dd602aff2eb4c51. Site ultimateapp1
31/10/2023 10:30:16.700 INFO - Site: ultimateapp1 - [1048bb9e1e6c5fe24df0ef6f91cb22e994e32a9ff051138e1dd602aff2eb4c51] - Signal the entrypoint process to gracefully stop the container if container handles CTRL_SHUTDOWN_EVENT event: 1048bb9e1e6c5fe24df0ef6f91cb22e994e32a9ff051138e1dd602aff2eb4c51. Site ultimateapp1
31/10/2023 10:30:21.723 INFO - Site: ultimateapp1 - [1048bb9e1e6c5fe24df0ef6f91cb22e994e32a9ff051138e1dd602aff2eb4c51] - Wait for the entrypoint process to gracefully stop the container if it handles CTRL_SHUTDOWN_EVENT event. Container: 1048bb9e1e6c5fe24df0ef6f91cb22e994e32a9ff051138e1dd602aff2eb4c51. Site: ultimateapp1
31/10/2023 10:30:26.724 INFO - Site: ultimateapp1 - [1048bb9e1e6c5fe24df0ef6f91cb22e994e32a9ff051138e1dd602aff2eb4c51] - Wait for the entrypoint process to gracefully stop the container has finished but the process is still running. Possible causes are: 1) The container doesn't handle the termination signals. 2) The default stop timeout is too short. The default timeout can be changed with the appsetting WEBSITES_CONTAINER_STOP_TIME_LIMIT=00:00:30. Container: 1048bb9e1e6c5fe24df0ef6f91cb22e994e32a9ff051138e1dd602aff2eb4c51. Site: ultimateapp1
31/10/2023 10:30:30.069 INFO - Site: ultimateapp1 - [1048bb9e1e6c5fe24df0ef6f91cb22e994e32a9ff051138e1dd602aff2eb4c51] - Shutdown container: 1048bb9e1e6c5fe24df0ef6f91cb22e994e32a9ff051138e1dd602aff2eb4c51
31/10/2023 10:30:30.132 INFO - Site: ultimateapp1 - [1048bb9e1e6c5fe24df0ef6f91cb22e994e32a9ff051138e1dd602aff2eb4c51] - Attempting to remove container: 1048bb9e1e6c5fe24df0ef6f91cb22e994e32a9ff051138e1dd602aff2eb4c51
31/10/2023 10:30:30.975 INFO - Site: ultimateapp1 - [1048bb9e1e6c5fe24df0ef6f91cb22e994e32a9ff051138e1dd602aff2eb4c51] - Container removed successfully. Container Id: 1048bb9e1e6c5fe24df0ef6f91cb22e994e32a9ff051138e1dd602aff2eb4c51
31/10/2023 10:30:30.975 INFO - Site: ultimateapp1 - Purging pending logs after stopping container