Hi,
I have tried running rocket chat on ECS Fargate, But the mongodb container seems to be stopping with Signal15. I have attached the docker compose file and ecs-params file below.
Has anyone been able to run rocket chat on fargate?
version: '2'
services:
rocketchat:
image: rocket.chat
command: bash -c 'for i in `seq 1 30`; do node main.js && s=$$? && break || s=$$?; echo "Tried $$i times. Waiting 5 secs..."; sleep 5; done; (exit $$s)'
restart: unless-stopped
volumes:
- /app/uploads
environment:
- PORT=3000
- ROOT_URL=https://chat.xxx.com
- MONGO_URL=mongodb://localhost:27017/rocketchat
- MONGO_OPLOG_URL=mongodb://localhost:27017/local
- MAIL_URL=smtp://smtp.email
ports:
- 3000:3000
labels:
- "traefik.backend=rocketchat"
- "traefik.frontend.rule=Host: chat.xxx.com"
mongo:
image: mongo:4.0
restart: unless-stopped
volumes:
- /data/db
command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1
labels:
- "traefik.enable=false"
mongo-init-replica:
image: mongo:4.0
command: 'bash -c "for i in `seq 1 30`; do mongo mongo/rocketchat --eval \"rs.initiate({ _id: ''rs0'', members: [ { _id: 0, host: ''localhost:27017'' } ]})\" && s=$$? && break || s=$$?; echo \"Tried $$i times. Waiting 5 secs...\"; sleep 5; done; (exit $$s)"'
ecs-params.yml
version: 1
task_definition:
ecs_network_mode: awsvpc
task_size:
mem_limit: 8GB
cpu_limit: 2048
run_params:
network_configuration:
awsvpc_configuration:
assign_public_ip: ENABLED
subnets:
- subnet-xxx
- subnet-xxx