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
This commit is contained in:
vinny
2018-05-06 21:08:49 +02:00
commit 95e2f680bc
3 changed files with 52 additions and 0 deletions

22
Readme Normal file
View File

@@ -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
```

19
docker-compose.yml Normal file
View File

@@ -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

11
utils/config/local.coffee Normal file
View File

@@ -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