I have a slightly modified version of the container here:
http://jasonwilder.com/blog/2014/03/25/automated-nginx-reverse-proxy-for-docker/
To run it locally I use:
$ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock -t jwilder/nginx-proxy
And run my other containers similar to below:
$ docker run -e VIRTUAL_HOST=my-domain.local -t -d my-repo/site-name
I'm having trouble converting this to a Task Definition on ECS.
Task definition
I have two containers:
nginx-reverse-proxy
- Port mappings: Host 80 Container 80
- Essential: true
- Command: /app/docker-entrypoint.sh
static-site
- Port mappings: Host 5000 Container 5000
- Essential: false
- Command: /some-file.sh
- Env vars: VIRTUAL_HOST static.example.com
I have a cluster with one ECS instance and a server with one task, defined above. This keeps cycling and fails with "STOPPED (Essential container in task exited)".
Now I assume I need to setup volumes but all the examples I can find have a path and a name and I can't see how I can convert this "/var/run/docker.sock:/tmp/docker.sock" into any fields available.
ha-proxy
withenvironment variables
. Here's a solution repository. – GNOKOHEAT