~/docker/golang
Dockerfile_dep
=> production(dep)Dockerfile_dev
=> development(dev)
Change the value of the environment variable DOCKER_APP_ENV
in the ~/.env file
.
build:
context: .
dockerfile: Dockerfile_dev
App(Golang) development is directly under ~/app
.
Go into the container and execute the go run
command.
$ docker exec -it slackbot-app /bin/ash
/app # go run main.go
-
Bot User OAuth Access Token
# cat $BOT_USER_OAUTH_ACCESS_TOKEN_PATH
-
Verification Token
# cat $VERIFICATION_TOKEN_PATH
-
Workspace Token
# cat $WORKSPACE_TOKEN_PATH
-
Connect your account
$ cd ngrok $ ./ngrok authtoken <Token>
-
Start Docker container for production
Make Docker a production environment
DOCKER_APP_ENV=dep
$ docker-compose up --build
-
Fire it up
$ ./ngrok http -host-header="0.0.0.0:3000" 3000