Deploying on Azure Web App
msdcanderson opened this issue · 2 comments
Thank you for your work on getting LimeSurvey into Docker, it looks very comprehensive!
I'm struggling to deploy to Azure Web Apps and hoping you can help?
I am using a Linux Web App in Azure.
Web App Deployment Centre
Default_docker.log
2022-10-04T09:40:53.481863544Z Info: Customizing Apache Listen port to 8080
2022-10-04T09:40:53.574860199Z Connection to site-postgresql-rec.postgres.database.azure.com (51.IP ADDRESS) 5432 port [tcp/*] succeeded!
2022-10-04T09:40:53.577127176Z Info: Generating config.php
2022-10-04T09:40:53.577999667Z Info: Using PostgreSQL configuration
2022-10-04T09:40:53.578758159Z Info: Using TCP connection
2022-10-04T09:40:53.579425752Z Info: Setting PublicURL
2022-10-04T09:40:53.590359041Z Info: Creating security.php
2022-10-04T09:40:53.590984835Z Warning: No encryption keys were provided
2022-10-04T09:40:53.591581829Z Warning: A security.php config will be created by the application
2022-10-04T09:40:53.592245122Z Warning: THIS FILE NEEDS TO BE PERSISTENT
2022-10-04T09:40:53.592874616Z Info: Check if database already provisioned. Nevermind the Stack trace.
2022-10-04T09:40:54.185073997Z CException: DataBase version are not found, seems LimeSurvey are not installed. in /var/www/html/application/commands/UpdateDbCommand.php:36
2022-10-04T09:40:54.185117897Z Stack trace:
2022-10-04T09:40:54.185124097Z #0 /var/www/html/third_party/yiisoft/yii/framework/console/CConsoleCommandRunner.php(71): UpdateDBCommand->run()
2022-10-04T09:40:54.185128597Z #1 /var/www/html/third_party/yiisoft/yii/framework/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
2022-10-04T09:40:54.185132597Z #2 /var/www/html/third_party/yiisoft/yii/framework/base/CApplication.php(185): CConsoleApplication->processRequest()
2022-10-04T09:40:54.185136397Z #3 /var/www/html/application/commands/console.php(77): CApplication->run()
2022-10-04T09:40:54.197908367Z #4 {main}
2022-10-04T09:40:54.197928467Z Running console.php install
2022-10-04T09:40:54.476407636Z CException: Invalid access data. Check your config.php db access data in /var/www/html/application/commands/InstallCommand.php:115
2022-10-04T09:40:54.476456536Z Stack trace:
2022-10-04T09:40:54.476462436Z #0 /var/www/html/application/commands/InstallCommand.php(50): InstallCommand->createDatabase()
2022-10-04T09:40:54.476467136Z #1 /var/www/html/third_party/yiisoft/yii/framework/console/CConsoleCommandRunner.php(71): InstallCommand->run()
2022-10-04T09:40:54.476471336Z #2 /var/www/html/third_party/yiisoft/yii/framework/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
2022-10-04T09:40:54.476475436Z #3 /var/www/html/third_party/yiisoft/yii/framework/base/CApplication.php(185): CConsoleApplication->processRequest()
2022-10-04T09:40:54.476506135Z #4 /var/www/html/application/commands/console.php(77): CApplication->run()
2022-10-04T09:40:54.735070608Z AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.21.9.3. Set the 'ServerName' directive globally to suppress this message
2022-10-04T09:40:54.761829736Z AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.21.9.3. Set the 'ServerName' directive globally to suppress this message
2022-10-04T09:40:54.803145216Z [Tue Oct 04 09:40:54.802967 2022] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.54 (Debian) PHP/8.0.23 configured -- resuming normal operations
2022-10-04T09:40:54.803216715Z [Tue Oct 04 09:40:54.803114 2022] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
Docker.log
2022-10-04T09:49:21.650Z INFO - Pulling image: martialblog/limesurvey:latest
2022-10-04T09:49:22.704Z INFO - latest Pulling from martialblog/limesurvey
2022-10-04T09:49:22.705Z INFO - Digest: sha256:d2c861773e3dd9dbfdcf31f67179d733bbec9158487ce61f8eeef8203115a23e
2022-10-04T09:49:22.706Z INFO - Status: Image is up to date for martialblog/limesurvey:latest
2022-10-04T09:49:22.710Z INFO - Pull Image successful, Time taken: 0 Minutes and 1 Seconds
2022-10-04T09:49:22.728Z INFO - Starting container for site
2022-10-04T09:49:22.729Z INFO - docker run -d -p 2617:80 --name limesur-test_0_54fab801 -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITE_SITE_NAME=limesur-test -e WEBSITE_AUTH_ENABLED=False -e PORT=80 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=limesur-test.azurewebsites.net -e WEBSITE_INSTANCE_ID=a9316b1bd4aefbe0c2af37e717a5a4098a5c99166a0a2640d2bfba382adefb91 -e HTTP_LOGGING_ENABLED=1 -e WEBSITE_USE_DIAGNOSTIC_SERVER=False martialblog/limesurvey:latest
2022-10-04T09:49:23.931Z INFO - Initiating warmup request to container limesur-test_0_54fab801 for site limesur-test
2022-10-04T09:49:39.002Z INFO - Waiting for response to warmup request for container limesur-test_0_54fab801. Elapsed time = 15.0716419 sec
2022-10-04T09:49:54.082Z INFO - Waiting for response to warmup request for container limesur-test_0_54fab801. Elapsed time = 30.1511978 sec
2022-10-04T09:50:09.159Z INFO - Waiting for response to warmup request for container limesur-test_0_54fab801. Elapsed time = 45.2284648 sec
2022-10-04T09:50:24.239Z INFO - Waiting for response to warmup request for container limesur-test_0_54fab801. Elapsed time = 60.3086749 sec
2022-10-04T09:50:39.315Z INFO - Waiting for response to warmup request for container limesur-test_0_54fab801. Elapsed time = 75.3843867 sec
2022-10-04T09:51:13.399Z INFO - Waiting for response to warmup request for container limesur-test_0_54fab801. Elapsed time = 109.467902 sec
2022-10-04T09:51:29.293Z INFO - Waiting for response to warmup request for container limesur-test_0_54fab801. Elapsed time = 125.3622768 sec
2022-10-04T09:51:44.369Z INFO - Waiting for response to warmup request for container limesur-test_0_54fab801. Elapsed time = 140.4384649 sec
2022-10-04T09:51:59.455Z INFO - Waiting for response to warmup request for container limesur-test_0_54fab801. Elapsed time = 155.5241232 sec
2022-10-04T09:52:14.532Z INFO - Waiting for response to warmup request for container limesur-test_0_54fab801. Elapsed time = 170.6016594 sec
2022-10-04T09:52:29.618Z INFO - Waiting for response to warmup request for container limesur-test_0_54fab801. Elapsed time = 185.6868417 sec
2022-10-04T09:53:03.837Z INFO - Waiting for response to warmup request for container limesur-test_0_54fab801. Elapsed time = 219.9058855 sec
2022-10-04T09:53:14.907Z ERROR - Container limesur-test_0_54fab801 for site limesur-test did not start within expected time limit. Elapsed time = 230.9767363 sec
2022-10-04T09:53:14.922Z ERROR - Container limesur-test_0_54fab801 didn't respond to HTTP pings on port: 80, failing site start. See container logs for debugging.
2022-10-04T09:53:14.930Z INFO - Stopping site limesur-test because it failed during startup.
Configuration / Environment Variables
[
{
"name": "ADMIN_EMAIL",
"value": "mike@example.com",
"slotSetting": false
},
{
"name": "ADMIN_NAME",
"value": "Mike",
"slotSetting": false
},
{
"name": "ADMIN_PASSWORD",
"value": "PASSWORD",
"slotSetting": false
},
{
"name": "ADMIN_USER",
"value": "mike",
"slotSetting": false
},
{
"name": "BASE_URL",
"value": "https://limesur-test.azurewebsites.net/limesurvey/",
"slotSetting": false
},
{
"name": "DB_HOST",
"value": "site-postgresql-rec.postgres.database.azure.com",
"slotSetting": false
},
{
"name": "DB_PASSWORD",
"value": "PASSWORD",
"slotSetting": false
},
{
"name": "DB_PORT",
"value": "5432",
"slotSetting": false
},
{
"name": "DB_TABLE_PREFIX",
"value": "limetest_",
"slotSetting": false
},
{
"name": "DB_TYPE",
"value": "pgsql",
"slotSetting": false
},
{
"name": "DEBUG",
"value": "1",
"slotSetting": false
},
{
"name": "DEBUG_SQL",
"value": "1",
"slotSetting": false
},
{
"name": "DOCKER_REGISTRY_SERVER_PASSWORD",
"value": "",
"slotSetting": false
},
{
"name": "DOCKER_REGISTRY_SERVER_URL",
"value": "https://index.docker.io",
"slotSetting": false
},
{
"name": "DOCKER_REGISTRY_SERVER_USERNAME",
"value": "",
"slotSetting": false
},
{
"name": "POSTGRES_DB",
"value": "limetest",
"slotSetting": false
},
{
"name": "POSTGRES_PASSWORD",
"value": "PASSWORD",
"slotSetting": false
},
{
"name": "POSTGRES_USER",
"value": "USERNAME",
"slotSetting": false
},
{
"name": "ServerName",
"value": "51.IP ADDRESS",
"slotSetting": false
},
{
"name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE",
"value": "false",
"slotSetting": false
}
]
Thank you for any help
Hello, thanks for the feedback.
I think the issue might be the port 80:
2022-10-04T09:49:22.729Z INFO - docker run -d -p 2617:80 --name limesur-test_0_54fab801 -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITE_SITE_NAME=limesur-test -e WEBSITE_AUTH_ENABLED=False -e PORT=80 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=limesur-test.azurewebsites.net -e WEBSITE_INSTANCE_ID=a9316b1bd4aefbe0c2af37e717a5a4098a5c99166a0a2640d2bfba382adefb91 -e HTTP_LOGGING_ENABLED=1 -e WEBSITE_USE_DIAGNOSTIC_SERVER=False martialblog/limesurvey:latest
Starting from 5.0, Apache defaults to listening on a non-privilged port (8080) in inside the container (see README). Because we are using a non-root user in the Image, we had to change the port.
Can you test if changing the port to 8080 helps? e.g. docker run -d -p 2617:809- --name limesur-test...
Thank you! That seems to have done it.
I added an Environment variable called 'PORT'