A simple golang app - REST API CRUD connected to a NOSQL MongoDB Database and protected behind a NGINX proxy
Feel free to use, comment and contribute
Create a swarm (Docker Swarm Cheatsheet). You do this by running:
docker swarm init
To start the Docker services stack in a Docker Swarm cluster, I use the following command:
docker stack deploy -c docker-stack.yml myapp
Check app health:
curl -k -H "Content-Type: application/json" http://<your ip:port>/health
Store new flight:
curl -k -d '{"flightNum":"LA8781", "airline":"TAM", "airport":"Confins", "status":"Confirmed", "expected":"20180713083500", "confirmed":"20180713083500"}' -H "Content-Type: application/json" -X POST http://<your ip:port>/flights
Get all flights:
curl -k -X GET http://<your ip:port>/flights