- sails
- mongo
./data/sails
: This folder must be the root of a sails project. If it is empty, a sails project will be created at the creation of the sails container.mongoVolume
: Named volume containing the data created by the mongo database
Using docker-compose, it is possible to access to the running containers and to execute commands directly in them.
The following command will open an interactive bash
in the container sails
.
$ docker-compose exec sails bash
The sails application in this configuration is created in the following github repository. Dockerfile
The mongodb database is created automatically at the creation of the container. The following environment variables can be used to configure the user, passwords and name of database that are created.
ADMIN_USER: "root"
ADMIN_PASS: "mongdb123"
MONGO_DB: "packebian"
MONGO_USER: "packebian"
MONGO_PASS: "packebian123"
The following command can be used to access to the $MONGO_DB
database.
$ docker-compose exec mongodb mongo $MONGO_DB -u $MONGO_USER -p $MONGO_PASS