commit 95e2f680bc37c81acf31b4bbb0dc3649086cfac5 Author: vinny Date: Sun May 6 21:08:49 2018 +0200 initial docker-compose with node6 & couchdb1.7 initially written in a dockerfile, inventaire is actually running from local inventaire folder compiled mannually at hand and lunch inside docker compose letting the possibility of editing branching inventaire folder and mount it on docker when ready to test for production environement diff --git a/Readme b/Readme new file mode 100644 index 0000000..3bf020c --- /dev/null +++ b/Readme @@ -0,0 +1,22 @@ +Readme + +To run inventaire in a docker-compose setup + +## Install + +Get [docker-compose](https://docs.docker.com/compose/gettingstarted/) on your machine + +Clone this repo +``` +git clone https://github.com/inventaire/inventaire-docker.git +cd inventaire-docker +``` + +then setup you own inventaire locally within inventaire-docker folder. +Copy docker utils files into inventaire folder if necessary + +``` +git clone https://github.com/inventaire/inventaire.git +cp utils/config/local.coffee inventaire/config/local.coffee +docker-compose up -d +``` diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..b51bd7c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,19 @@ +version: '3' +services: + couch: + image: couchdb:1.7.1 + ports: + - "5984:5984" + environment: + COUCHDB_USER: "couchdb" + COUCHDB_PASSWORD: "password" + app: + image: node:6.11.1 + command: "npm start" + ports: + - "3006:3006" + volumes: + - ./inventaire:/inventaire + links: + - couch + working_dir: /inventaire diff --git a/utils/config/local.coffee b/utils/config/local.coffee new file mode 100644 index 0000000..06de10a --- /dev/null +++ b/utils/config/local.coffee @@ -0,0 +1,11 @@ +module.exports = + env: 'production' + host: '0.0.0.0' + db: + protocol: 'http' + # host defined in docker-compose couchdb image name + host: 'couch' + port: '5984' + username: 'couchdb' + password: 'password' + debug: true