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 5
5
- nodejs https://nodejs.org/en/ (v12+)
6
6
- PostgreSQL
7
7
- ElasticSearch (7.x)
8
+ - Docker
9
+ - Docker-Compose
8
10
9
11
## Configuration
10
12
@@ -55,6 +57,9 @@ The following parameters can be set in config files or in env variables:
55
57
- Start app ` npm start `
56
58
- App is running at ` http://localhost:3000 `
57
59
60
+ ## Docker Deployment
61
+ - Run ` docker-compose up `
62
+
58
63
## Testing
59
64
- Run ` npm run test ` to execute unit tests
60
65
- 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