File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Dockerized NodeJs App
2+ on : push
3+
4+ jobs :
5+ node-docker :
6+ runs-on : ubuntu-latest
7+
8+ # Instead of the 'container' key, specify 'services'
9+ services :
10+ # The following is very similar to a docker_compose.yml file
11+ app :
12+ # Specify the username/imagename on dockerhub.com
13+ build : alialaa17/node-api
14+ ports :
15+ - 3001:3000
16+ mongo :
17+ image : mongo
18+ ports :
19+ - " 27017:27017"
20+ steps :
21+ - name : Post a user
22+ # Send a HTTP POST request to create a user to the mongo DB.
23+ run : " curl -X POST http://localhost:3001/api/user -H 'Content-Type: application: application/json' -d '{\" username\" : \" hello\" , \" address\" : \" dwded\" }'"
24+ run : " curl -X POST http://localhost:3001/api/user -H 'Content-Type: application: application/json' -d '{\" username\" : \" hello\" , \" address\" : \" pluk\" }'"
25+ - name : Get Users
26+ run : curl http://localhost:3001/api/users
27+
28+
29+
30+
31+
You can’t perform that action at this time.
0 commit comments