-
-
Save aujkis/4f36c87423a55a6acdfe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create a mongo app | |
flynn create --remote "" mongo | |
# create a release using the latest (at the time of writing) Docker MongoDB image | |
flynn -a mongo release add -f config.json "https://registry.hub.docker.com?name=mongo&id=216d9a0e82646f77b31b78eeb0e26db5500930bbd6085d5d5c3844ec27c0ca50" | |
# scale the server to one process. This may time out initially as the server pulls the image, but watch "flynn -a mongo ps" and it should come up. | |
flynn -a mongo scale server=1 | |
# mongo should now be running in the cluster at mongo.discoverd:27017 | |
flynn -a mongo run mongo --host mongo.discoverd --port 27017 | |
> db.hostInfo().ok | |
1 | |
# note that the container does not have a data volume, so restarting the container will get a new data directory. This will be fixed when we have a MongoDB appliance within Flynn. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"processes": { | |
"server": { | |
"cmd": ["mongod"], | |
"ports": [{ | |
"port": 27017, | |
"proto": "tcp", | |
"service": { | |
"name": "mongo", | |
"create": true, | |
"check": { "type": "tcp" } | |
} | |
}] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment