mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
Make the app runnable with docker-compose
This commit is contained in:
parent
4854ca58e7
commit
93a05ef666
13
docker-compose.yml
Normal file
13
docker-compose.yml
Normal 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
|
@ -17,6 +17,7 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"db-migrate-and-start": "npm run db-migrate && npm run start",
|
||||||
"start": "NODE_ENV=production node server.js",
|
"start": "NODE_ENV=production node server.js",
|
||||||
"build": "./node_modules/.bin/webpack -p",
|
"build": "./node_modules/.bin/webpack -p",
|
||||||
"dev": "NODE_ENV=development supervisor --ignore ./node_modules/,./public/js server.js",
|
"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",
|
"docker-test": "export PORT=4243 ; ./scripts/docker-postgres.sh",
|
||||||
"pg-virtualenv-test": "pg_virtualenv npm run pg-virtualenv-chain",
|
"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",
|
"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",
|
"db-migrate-testdb": "DATABASE_URL=$TEST_DATABASE_URL ./node_modules/.bin/db-migrate up",
|
||||||
"tdd": "mocha --watch test test/*",
|
"tdd": "mocha --watch test test/*",
|
||||||
"test-bamboo-ci": "mocha test test/*",
|
"test-bamboo-ci": "mocha test test/*",
|
||||||
|
Loading…
Reference in New Issue
Block a user