mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +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:
parent
f4e7510902
commit
77baaa5121
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,6 +1,5 @@
|
|||||||
node_modules
|
node_modules
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.vscode
|
|
||||||
|
|
||||||
# Logs
|
# Logs
|
||||||
logs
|
logs
|
||||||
|
10
Dockerfile
10
Dockerfile
@ -1,10 +0,0 @@
|
|||||||
FROM node:5.8
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
RUN npm install --production && \
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
EXPOSE 4242
|
|
||||||
|
|
||||||
CMD node server.js
|
|
@ -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
|
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.
|
unleash locally without setting up a database or node.
|
||||||
|
|
||||||
|
You find the docker files inside the `packages/unleash-docker` folder
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker-compose build
|
$ docker-compose build
|
||||||
$ docker-compose up
|
$ docker-compose up
|
||||||
|
11
packages/unleash-docker/Dockerfile
Normal file
11
packages/unleash-docker/Dockerfile
Normal 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
|
@ -1,6 +1,6 @@
|
|||||||
web:
|
web:
|
||||||
build: .
|
build: .
|
||||||
command: npm run db-migrate-and-start
|
command: npm run migrate-and-start
|
||||||
ports:
|
ports:
|
||||||
- "4242:4242"
|
- "4242:4242"
|
||||||
links:
|
links:
|
3
packages/unleash-docker/index.js
Normal file
3
packages/unleash-docker/index.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
'use strict';
|
||||||
|
var unleash = require('unleash-server');
|
||||||
|
unleash.start({});
|
18
packages/unleash-docker/package.json
Normal file
18
packages/unleash-docker/package.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user