1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

Make the app runnable with docker-compose

This commit is contained in:
Stig Kleppe-Jørgensen 2015-06-17 10:07:50 +02:00
parent dd6ea520af
commit 1fb1b4e085
2 changed files with 15 additions and 0 deletions

13
docker-compose.yml Normal file
View File

@ -0,0 +1,13 @@
web:
build: .
command: run db-migrate-and-start
ports:
- "4242:4242"
links:
- db
environment:
DATABASE_URL: postgres://postgres:unleash@db/postgres
db:
expose:
- "5432"
image: postgres:9.3

View File

@ -17,6 +17,7 @@
},
"private": true,
"scripts": {
"db-migrate-and-start": "npm run db-migrate && npm run start",
"start": "NODE_ENV=production node server.js",
"build": "./node_modules/.bin/webpack -p",
"dev": "NODE_ENV=development supervisor --ignore ./node_modules/,./public/js server.js",
@ -26,6 +27,7 @@
"docker-test": "export PORT=4243 ; ./scripts/docker-postgres.sh",
"pg-virtualenv-test": "pg_virtualenv npm run pg-virtualenv-chain",
"pg-virtualenv-chain": "export TEST_DATABASE_URL=postgres://$PGUSER:$PGPASSWORD@localhost:$PGPORT/postgres ; npm run db-migrate-testdb && npm test",
"db-migrate": "node_modules/.bin/db-migrate up",
"db-migrate-testdb": "DATABASE_URL=$TEST_DATABASE_URL ./node_modules/.bin/db-migrate up",
"tdd": "mocha --watch test test/*",
"test-bamboo-ci": "mocha test test/*",