X Project
make install
- creates a volume to persist postgres data
- builds base golang image (used for
run
commands)
make up
/ make down
- start/stop the app on port 8080 in dev mode with docker-compose
(no hot-reload yet)
make debug
/ make debug-down
- start/stop the app in debug mode
to attach from vscode add the following configuration to .vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Docker debug",
"type": "go",
"request": "launch",
"mode": "remote",
"remotePath": "/go/src/github.com/radisvaliullin/cloudbilling/cmd/cloudbilling",
"port": 2345,
"host": "127.0.0.1",
"program": "${workspaceRoot}/cmd/cloudbilling",
"env": {},
"args": ["-v"],
"showLog": true,
"trace": "verbose"
},
]
}
make unit-test
make integration-test
make db/run
- standalone postgresdb container.
make lint
make cover
(sections should be moved to wiki)
docker exec -it {container_name} sh
//attach to a running container in interactive mode and run shell
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
docker volume rm $(docker volume ls -qf dangling=true)