snibox-docker
snibox-docker copied to clipboard
Running Snibox on AWS ECS
I'm trying to run Snibox (Docker) version on AWS Elastic Container Service. I have the container host built and its working as far as I can tell. However, when I try to deploy Snibox to it, the frontend keeps failing with the error:
nginx: [emerg] host not found in upstream "backend:3000" in /etc/nginx/conf.d/default.conf:17
Here is my ecs-params.yml
file which "complements" the docker-compose.yml
file:
version: 1
task_definition:
task_role_arn: ecs-cluster-dev-ECSRole-XXXXXX
task_execution_role: ecs-cluster-dev-ECSRole-XXXXXX
services:
frontend:
cpu_shares: 5
mem_limit: 256
volumesFrom:
- ContainerName: backend
Readonly: false
backend:
cpu_shares: 5
mem_limit: 512
database:
cpu_shares: 10
mem_limit: 512
docker_volumes:
- name: 'pg-data'
scope: 'shared'
autoprovision: true
- name: 'static-files'
scope: 'shared'
autoprovision: true
run_params:
network_configuration:
awsvpc_configuration:
subnets:
- subnet-XXXXXX
- subnet-XXXXXX
Note that the dependsOn
option is not valid in ECS, so its essentially ignored. I read that you can use volumesFrom
instead, but that doesn't seem to change anything.