Here's my setup:
Docker Compose File for my wordpress site
version: '3'
services:
wordpress:
# image: wordpress
image: 506641774060.dkr.ecr.us-west-2.amazonaws.com/cashinyourpoints:latest
restart: always
ports:
- 8081:80
links:
- mysql
environment:
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: secret
VIRTUAL_HOST: cashinyourpoints.com
mysql:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: secret
volumes:
- ./db:/docker-entrypoint-initdb.d
- ./dbData:/var/lib/mysql
Docker Compose file for my Nginx Proxy
version: '2'
services:
nginx-proxy:
image: jwilder/nginx-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
I run ecs compose up
on both. However, when I try to go to http://cashinyourpoints.com I get a "503: Service Temporarily Unavailable" error. When I go directly to the container's ip I get the same error. And when I run the test command I still get that same error curl -H "Host: whoami.local" 54.184.203.137
My ecs-cli ps
output
Name State Ports TaskDefinition Health
9bf63a86-ae41-4c73-ad21-83f4adcbdfa6/nginx-proxy RUNNING 54.184.203.137:80->80/tcp aws-nginx-config:1 UNKNOWN
a88c599b-8a88-41bc-b00f-ad57fc8df82e/wordpress RUNNING 54.184.203.137:8081->80/tcp cashinyourpoints:30 UNKNOWN
a88c599b-8a88-41bc-b00f-ad57fc8df82e/mysql RUNNING cashinyourpoints:30 UNKNOWN
I read somewhere that this may be related to networking, but I couldn't figure out how to get the Amazon version of Docker networking started (Docker's network property is not supported).
I'm stuck at how would I create a subnet in the vpc model?