Does rancher server and database can be separated in a docker-compose file?

Hi,
i’m trying to backup to s3 the rancher database.
One docker image can do the job : nickbreen/mysql-backup-cron
i’ve tried to separate rancher server and database via a docker-compose file

server:
image: rancher/server:v0.56.1
ports:
- "8080:8080"
environment:
- CATTLE_DB_CATTLE_MYSQL_HOST=database
- CATTLE_DB_CATTLE_MYSQL_PORT=3306
- CATTLE_DB_CATTLE_MYSQL_NAME=cattle
- CATTLE_DB_CATTLE_USERNAME=cattle
- CATTLE_DB_CATTLE_PASSWORD=secret

links:
- database:database

database:
image: mysql:5.7.10
environment:
- MYSQL_ROOT_PASSWORD=supersecret
- MYSQL_DATABASE=cattle
- MYSQL_USER=cattle
- MYSQL_PASSWORD=secret
expose:
- “3306”

but rancher server cannot access to database.
docker version : 1.9.1
docker-compose : 1.5.2
have you any clue?

best regards,

Charles.

Hi,
it seems to be a firewall issue.
it works on my laptop.

best regards,

Charles.