mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-08-23 06:08:43 +08:00
Add option to use Docker container to run Asynqmon
This commit is contained in:
21
Makefile
21
Makefile
@@ -1,11 +1,24 @@
|
||||
.PHONY: assets go_binary build docker
|
||||
|
||||
NODE_MODULES_PATH = $(PWD)/ui/node_modules
|
||||
|
||||
# Checking for a node_modules folder before building.
|
||||
assets:
|
||||
@if [ -d "$(NODE_MODULES_PATH)" ]; then cd ./ui && yarn install; fi
|
||||
cd ./ui && yarn build
|
||||
|
||||
# TODO: Update this once go1.16 is released.
|
||||
go_binary:
|
||||
go1.16rc1 build -o asynqmon .
|
||||
# Build go binary.
|
||||
go_binary: assets
|
||||
go build -o asynqmon .
|
||||
|
||||
# Target to build a release binary.
|
||||
build: assets go_binary
|
||||
build: go_binary
|
||||
|
||||
# Build image and run Asynqmon server (with default settings).
|
||||
docker:
|
||||
docker build -t asynqmon .
|
||||
docker run --rm \
|
||||
--name asynqmon \
|
||||
-p 8080:8080 \
|
||||
asynqmon
|
||||
|
||||
|
Reference in New Issue
Block a user