-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
www: | |
type: php | |
ports: | |
admin: tcp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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