File tree Expand file tree Collapse file tree 4 files changed +56
-0
lines changed Expand file tree Collapse file tree 4 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ # Versioning and metadata
2+ .git
3+ .gitignore
4+ .dockerignore
5+
6+ # Build dependencies
7+ dist
8+ node_modules
9+ coverage
10+ .nyc_output
11+
12+ # Environment (contains sensitive data)
13+ .env
14+
15+ # Files not required for production
16+ .editorconfig
17+ docs
18+ Dockerfile *
19+ docker-compose.yml
20+ README.md
21+ tslint.json
Original file line number Diff line number Diff line change 55- nodejs https://nodejs.org/en/ (v12+)
66- PostgreSQL
77- ElasticSearch (7.x)
8+ - Docker
9+ - Docker-Compose
810
911## Configuration
1012
@@ -55,6 +57,9 @@ The following parameters can be set in config files or in env variables:
5557- Start app ` npm start `
5658- App is running at ` http://localhost:3000 `
5759
60+ ## Docker Deployment
61+ - Run ` docker-compose up `
62+
5863## Testing
5964- Run ` npm run test ` to execute unit tests
6065- Run ` npm run cov ` to execute unit tests and generate coverage report.
Original file line number Diff line number Diff line change 1+ version : ' 3'
2+ services :
3+ taas-apis :
4+ container_name : taas-apis
5+ build :
6+ context : .
7+ dockerfile : ./docker/Dockerfile
8+ ports :
9+ - ' 3000:3000'
Original file line number Diff line number Diff line change 1+
2+ FROM node:latest
3+
4+ # Set working directory. Paths will be relative this WORKDIR.
5+ WORKDIR /usr/src/app
6+
7+ ENV NODE_CONFIG_DIR /usr/src/app/config/
8+
9+ # Install dependencies
10+ COPY package*.json ./
11+ RUN npm install
12+
13+ # Copy source files from host computer to the container
14+ COPY . .
15+
16+
17+ # Specify port app runs on
18+ EXPOSE 3000
19+
20+ # Run the app
21+ CMD [ "node" , "app.js" ]
You can’t perform that action at this time.
0 commit comments