Skip to content

Instantly share code, notes, and snippets.

@adin
Forked from jpetazzo/README
Created December 20, 2011 00:25
Show Gist options
  • Save adin/1499583 to your computer and use it in GitHub Desktop.
Save adin/1499583 to your computer and use it in GitHub Desktop.
Get an "admin" port suitable for long-running HTTP connections (for e.g. big imports that take more than 1 minute)
Edit your dotcloud.yml file to add the "ports" section as shown in the sample dotcloud.yml.
Add a supervisord.conf to start the socat program.
Push your code. Use "dotcloud info" to retrieve the host+port to be used for your admin connection (it's conveniently named "admin" since it's what we requested in dotcloud.yml). Enjoy!
www:
type: php
ports:
admin: tcp
[program:socat]
#command = socat TCP-LISTEN:$PORT_ADMIN TCP-CONNECT:localhost:$PORT_WWW
command = socat TCP-LISTEN:42801,reuseaddr,fork TCP-CONNECT:localhost:80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment