This is an example of application/ service using Docker image auto builder. Feel free to fork, submit an issue, or whatever.
- Make sure you have docker installed on your local environment, or just following the steps provided by docker official website.
- Clone this repo and go inside the project root folder, or just type
git clone https://github.com/hellowin/example-docker-sails.git && cd example-docker-sails
- Run
./start-dependencies.sh
from Mac or Linux (for Windows you can mocking the steps insidestart-dependencies.sh
file, or do a pull request, sorry for not supporting Windows yet). - Now you already have
MongoDB
installed and running on your docker, check it bydocker ps
and see MongoDB container running. - Run
./start-dev.sh
, wait until sails lifted, and go tolocalhost:1337
or your VM where docker run when using Mac or Windows, default is192.168.99.100:1337
. - Enjoy developing, sails documentation related documentation are provided at their official website.
There are 2 ways for testing on production
environment.
- By using docker images that already uploaded or existing local images.
- By using local modified source code (without docker image).
- Just run
docker-compose -f docker-compose-prod.yml up
. - Production app. running on port
8081
and development app. running on port8080
.
- Prepare and start dependencies steps described at Development steps, but replace
./start-dev.sh
with./start-prod.sh
. - Production app. running on port
1337
, just like development app. but with concated, minified, and uglified assets.
When we already done developing, just run ./stop-dependencies.sh
(again, not supporting Windows yet), it will take down all running containers and shutting down running default VM when using Mac.
The MIT License (MIT)
Copyright (c) 2016 Andi N. Dirgantara
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.