mirror of
https://github.com/thomiceli/opengist.git
synced 2025-06-23 10:17:58 +02:00
Create docker dev env (#220)
This commit is contained in:
13
Makefile
13
Makefile
@ -1,4 +1,4 @@
|
||||
.PHONY: all all_crosscompile install build_frontend build_backend build build_crosscompile build_docker watch_frontend watch_backend watch clean clean_docker check_changes go_mod fmt test
|
||||
.PHONY: all all_crosscompile install build_frontend build_backend build build_crosscompile build_docker build_dev_docker run_dev_docker watch_frontend watch_backend watch clean clean_docker check_changes go_mod fmt test
|
||||
|
||||
# Specify the name of your Go binary output
|
||||
BINARY_NAME := opengist
|
||||
@ -31,16 +31,23 @@ build_docker:
|
||||
@echo "Building Docker image..."
|
||||
docker build -t $(BINARY_NAME):latest .
|
||||
|
||||
build_dev_docker:
|
||||
@echo "Building Docker image..."
|
||||
docker build -t $(BINARY_NAME)-dev:latest --target dev .
|
||||
|
||||
run_dev_docker:
|
||||
docker run -v .:/opengist -p 6157:6157 -p 16157:16157 $(BINARY_NAME)-dev:latest
|
||||
|
||||
watch_frontend:
|
||||
@echo "Building frontend assets..."
|
||||
npx vite -c public/vite.config.js dev --port 16157
|
||||
npx vite -c public/vite.config.js dev --port 16157 --host
|
||||
|
||||
watch_backend:
|
||||
@echo "Building Opengist binary..."
|
||||
OG_DEV=1 npx nodemon --watch '**/*' -e html,yml,go,js --signal SIGTERM --exec 'go run . --config config.yml'
|
||||
|
||||
watch:
|
||||
@bash ./scripts/watch.sh
|
||||
@sh ./scripts/watch.sh
|
||||
|
||||
clean:
|
||||
@echo "Cleaning up build artifacts..."
|
||||
|
Reference in New Issue
Block a user