added Dockerfile
This commit is contained in:
parent
2bb0c7eb4b
commit
53f264e63b
7 changed files with 902 additions and 446 deletions
20
.circleci/circle.yml
Normal file
20
.circleci/circle.yml
Normal file
|
@ -0,0 +1,20 @@
|
|||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
working_directory: ~/app
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ checksum "package-lock.json" }}
|
||||
- run:
|
||||
name: npm-install
|
||||
command: npm install
|
||||
- save_cache:
|
||||
key: dependency-cache-{{ checksum "package-lock.json" }}
|
||||
paths:
|
||||
- .node_modules
|
||||
- run:
|
||||
name: test
|
||||
command: npm test
|
4
.dockerignore
Normal file
4
.dockerignore
Normal file
|
@ -0,0 +1,4 @@
|
|||
node_modules
|
||||
.git
|
||||
.DS_Store
|
||||
static
|
9
Dockerfile
Normal file
9
Dockerfile
Normal file
|
@ -0,0 +1,9 @@
|
|||
FROM node:8-alpine
|
||||
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
RUN mkdir static
|
||||
RUN npm install
|
||||
|
||||
EXPOSE 1443
|
||||
CMD ["npm", "start"]
|
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
version: "3"
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
links:
|
||||
- redis
|
||||
ports:
|
||||
- "1443:1443"
|
||||
environment:
|
||||
- P2P_REDIS_HOST=redis
|
||||
redis:
|
||||
image: redis:alpine
|
9
docs/docker.md
Normal file
9
docs/docker.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
Environment Variables:
|
||||
|
||||
P2P_S3_BUCKET - the S3 bucket name
|
||||
P2P_REDIS_HOST - host name of the redis server
|
||||
NODE_ENV - production
|
||||
|
||||
Example
|
||||
|
||||
docker run --net=host -e 'NODE_ENV=production' -e 'P2P_S3_BUCKET=testpilot-p2p-dev' -e 'P2P_REDIS_HOST=dyf9s2r4vo3.bolxr4.0001.usw2.cache.amazonaws.com'
|
1292
package-lock.json
generated
1292
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -49,7 +49,7 @@
|
|||
"lint:css": "stylelint 'public/*.css'",
|
||||
"lint:html": "htmllint 'views/*.handlebars'",
|
||||
"lint:js": "eslint .",
|
||||
"start": "watchify frontend/src/main.js -o public/bundle.js -d | cross-env NODE_ENV=production node server/portal_server.js",
|
||||
"start": "browserify frontend/src/main.js -o public/bundle.js -d | cross-env NODE_ENV=production node server/portal_server.js",
|
||||
"test": "mocha"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue