diff --git a/README.md b/README.md index a34d935..23e0cc4 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,22 @@ Clone the project and `docker build . -t ` ## Running +### docker-compose +If you have [docker-compose](https://docs.docker.com/compose/overview/) v1.6.x or higher, you can simply clone this repo and then run the following command: + +``` +docker-compose up -d --build +``` + +You can then visit `http://localhost` on linux (Ubuntu). On Mac OSX, you can run `echo $(docker-machine ip default)` in terminal, and then visit that IP address in your browser. By default, an example admin account will be created for you. To obtain the credentials, run: + +``` +docker-compose logs strider | grep "Admin User" +``` + +Enter the credentials in your browser at the above address to get started with Strider-CD. + +### Manually Say you've created a database at MongoLab, here's how you would run it: `docker run -e "DB_URI=mongodb://keyvan:mypass@ds041380.mongolab.com:41380/strider-testing" ` diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..5471629 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,21 @@ +version: '2' + +services: + + mongo: + build: + context: ./mongo + dockerfile: Dockerfile + command: "mongod --smallfiles" + + strider: + build: + context: . + dockerfile: Dockerfile + environment: + - DB_URI=mongodb://mongo:27017 + - GENERATE_ADMIN_USER=1 + depends_on: + - mongo + ports: + - "80:3000"