14

Is the "Startup File" option on the docker web app options for docker-compose files? or shell commands? I cannot find any documentation for it...

Basically I'd like my Web App to run a docker-compose.yml instead of executing docker run [options] when I push an image to it.

Docker Startup File Option

Adil B
  • 14,635
  • 11
  • 60
  • 78
Jacob Weimer
  • 141
  • 1
  • 3
  • Its for shell (based on my experience where I had it running). Do note your container has a limited time to spin up or Azure just kills it. What defines its alive is responding on port 80 properly. – Dessus Feb 25 '18 at 07:32

3 Answers3

5

This is documented now, see below or click here.

What are the expected values for the Startup File section when I configure the runtime stack?

For Node.js, you specify the PM2 configuration file or your script file. For .NET Core, specify your compiled DLL name as dotnet <myapp>.dll. For Ruby, you can specify the Ruby script that you want to initialize your app with.

Turner Bass
  • 801
  • 8
  • 20
Dillon Brown
  • 305
  • 3
  • 9
2

Not sure if this is still a problem but I just noticed it appends whatever you put in there to the default startup command.

2019-09-02 05:03:04.493 INFO  - docker run -d -p 55721:80 --name xxxxxx -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITE_SITE_NAME=xxxxx -e WEBSITE_AUTH_ENABLED=False -e PORT=80 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=xxxxxx.azurewebsites.net -e WEBSITE_INSTANCE_ID=xxxxxxxxx -e HTTP_LOGGING_ENABLED=1 xxxxxx.azurecr.io/xxxxxxx:latest -p 80:4000 -p 443:8000

I put the -p 80:4000 -p 443:8000 into the textbox in the portal config

soutarm
  • 831
  • 1
  • 8
  • 14
  • By design, the last docker parameter after the image argument is the CMD to execute commands/script (port flags will not work and can only be set before the image parameter) – whindes Nov 03 '20 at 17:56
-3

Azure Web Apps for Containers does not support multi-container apps (with docker-compose) at the time of writing.

sabbour
  • 4,969
  • 6
  • 34
  • 33
  • I'm not looking for a multi-container app, but I want to auto-run other commands on startup, which can be achieved with docker-compose. Mainly, starting redis and celery to use with my flask app. [For Example](https://beenje.github.io/blog/posts/running-background-tasks-with-flask-and-rq/) – Jacob Weimer Nov 29 '17 at 14:18
  • Adding on here... The app I am using is built off this [Image](https://github.com/tiangolo/uwsgi-nginx-flask-docker) I can use supervisor.conf files to launch more processes to be used by my application. I will attempt this with redis and rq – Jacob Weimer Nov 29 '17 at 16:29
  • You can't run a Redis container in Azure Web Apps. The load balancer only allows inbound ports 80 and 443. – sabbour Nov 30 '17 at 19:54
  • He's not asking to run multi-container apps. – Jim Aho Dec 01 '18 at 20:13