Makefile 633 B

12345678910111213141516171819202122232425262728
  1. #@mkdir -o DIST/bin
  2. #@mkdir -o DIST/public
  3. all: backend frontend
  4. docker: Dockerfile
  5. docker build --rm -t hexasoftware.com:5000/myapp .
  6. deploy: docker
  7. docker push hexasoftware.com:5000/myapp
  8. backend: backend/src/simple-web/cmd/server/server.go
  9. @echo "Building backend... $(pwd)"
  10. CGO_ENABLED=0 go build -o DIST/bin/server backend/src/simple-web/cmd/server/server.go
  11. frontend: frontend/web/package.json
  12. @echo "Building frontend..."
  13. # Frontend
  14. @cd frontend/web;node build/build.js
  15. test: backend
  16. cd DIST;tmux split "DBHOST=localhost PORT=8080 DEVMODE=1 bin/server"
  17. cd frontend/web; npm run dev
  18. .PHONY: all test clean