Makefile 625 B

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