1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00

Introduce unleash-docker as a sperate submodule. (#136)

* Introduce unleash-docker as a sperate submodule.

this is related to #135 and will solve #126

* keep ide-user-settings out of repo

* Introduce unleash-docker as a sperate submodule.

this is related to #135 and will solve #126

* mv unleash-docker to packages/unleash-docker

* made docker work for now, by copying migrations

* minro cleanup

* docker on node:6

* minor cleanup
This commit is contained in:
Ivar Conradi Østhus 2016-06-18 01:11:49 +02:00
parent f4e7510902
commit 77baaa5121
8 changed files with 36 additions and 13 deletions

1
.gitignore vendored
View File

@ -1,6 +1,5 @@
node_modules
.DS_Store
.vscode
# Logs
logs

View File

@ -1,10 +0,0 @@
FROM node:5.8
COPY . .
RUN npm install --production && \
npm run build
EXPOSE 4242
CMD node server.js

View File

@ -16,6 +16,8 @@ Known client implementations:
We have set up docker-compose to start postgres and the unleash server together. This makes it really fast to start up
unleash locally without setting up a database or node.
You find the docker files inside the `packages/unleash-docker` folder
```bash
$ docker-compose build
$ docker-compose up

View File

@ -1,3 +1,3 @@
.git
docker-compose.yml
node_modules
node_modules

View File

@ -0,0 +1,11 @@
FROM nodesource/wheezy:6
COPY . .
RUN npm install --production
RUN mkdir scripts && cp node_modules/unleash-server/scripts/migration-runner.js scripts/. && \
mkdir migrations && cp -r node_modules/unleash-server/migrations/* migrations/.
EXPOSE 4242
CMD node index.js

View File

@ -1,6 +1,6 @@
web:
build: .
command: npm run db-migrate-and-start
command: npm run migrate-and-start
ports:
- "4242:4242"
links:

View File

@ -0,0 +1,3 @@
'use strict';
var unleash = require('unleash-server');
unleash.start({});

View File

@ -0,0 +1,18 @@
{
"name": "unleash-docker",
"version": "1.0.0",
"description": "Docker images for unleash.",
"main": "index.js",
"scripts": {
"start": "NODE_ENV=production node index.js",
"migrate-and-start": "npm run db-migrate && npm run start",
"db-migrate": "db-migrate up"
},
"author": "",
"license": "ISC",
"dependencies": {
"db-migrate": "0.9.25",
"mkdirp": "^0.5.1",
"unleash-server": "^1.0.0-alpha.2"
}
}