File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212PROJECT_VERSION = " 1.0.0-alpha"
1313
14+ # App-related settings
15+ APP_PORT = 8123 # must match port setting in `main.go` and EXPOSE in `Dockerfile`
16+
1417# Docker-related settings
1518DOCKER_IMAGE_NAME = " miguno/golang-docker-build-tutorial"
1619DOCKER_IMAGE_TAG = " latest"
Original file line number Diff line number Diff line change 9898
9999# send request to the app's HTTP endpoint (requires running container)
100100send-request-to-app :
101- curl http:// localhost:8123 / status
101+ @ curl http:// localhost:${APP_PORT} / status
102102
103103# run tests with colorized output (requires https://github.com/kyoh86/richgo)
104104test * FLAGS :
Original file line number Diff line number Diff line change 55# `-o pipefail`: Prevent errors in a pipeline (`|`) from being masked
66set -uo pipefail
77
8- declare -r APP_PORT=8123
9-
108# Import environment variables from .env
119set -o allexport && source .env && set +o allexport
1210echo " Starting container for image '$DOCKER_IMAGE_NAME :$DOCKER_IMAGE_TAG ', exposing port ${APP_PORT} /tcp"
You can’t perform that action at this time.
0 commit comments