vertx-spring
- ./run.sh
Stop all containers:
docker stop $(docker ps -a -q)
Remove all containers :
docker rm $(docker ps -a -q)
Remove all images
docker rmi $(docker images -q)
Remove all images which has name none
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
Access urls
Swagger works !!!
http://192.168.99.100:8585/socket.html
http://192.168.99.100:8585/api/health
http://192.168.99.100:8585/api/users
http://192.168.99.100:8585/api/products
eval $(docker-machine env default)
docker swarm init --advertise-addr=192.168.99.100
#run in docker compose 3 docker stack deploy --compose-file=docker-compose.yml vertx
For testing used Docker Toolbox
docker exec -u <your_postgres_user> <postgres_container_name> psql -c 'DROP DATABASE <your_db_name>'
docker exec -u postgres postgres-node psql -c 'DROP DATABASE socnet'
docker exec -u postgres postgres-node pg_dump -Fc socnet > ./postgres-node/db/dump.backup
docker exec -i -u postgres postgres-node pg_restore -C -d socnet < ./postgres-node/db/dump.backup
http://blog.arungupta.me/deploy-docker-compose-services-swarm/ https://docs.docker.com/compose/compose-file/#endpoint_mode
docker stack deploy --compose-file=docker-compose.yml vertx
docker ps -a
docker service ls
docker ps -a
docker exec -i -u postgres vertx_postgres-node.1.zcx53rhuv9h88txrhdgo4ymcp pg_restore -C -d socnet < ./postgres-node/db/dump.backup
docker ps -a
docker exec -i -u postgres vertx_postgres-node.1.i2idnfywdz07vb7vgnwf9ugqh pg_restore -C -d socnet < ./postgres-node/db/dump.backup
docker exec -i -u postgres postgres-node pg_restore -C -d socnet < ./postgres-node/db/dump.backup
http://192.168.99.100:8080/api/users
docker service ls
#scale docker service scale vertx_vertx-node=2
docker service scale vertx_postgres-node=2
docker service ls
docker stack rm vertx
https://opsani.com/skopos/docker-compose-generator/
docker run -d -p 8100:8100 --restart=unless-stopped -e skstkn=compose --name skopos -v /var/run/docker.sock:/var/run/docker.sock opsani/skopos:edge
Access
docker run \
--volume=/:/rootfs:ro \
--volume=/var/run:/var/run:rw \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--volume=/dev/disk/:/dev/disk:ro \
--publish=9999:9999 \
--detach=true \
--name=cadvisor \
google/cadvisor:latest
##YAML formatter online https://jsonformatter.org/yaml-formatter