Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. all: init user message location websocket
  2. init:
  3. mkdir -p /opt/api-user && \
  4. mkdir -p /opt/api-message && \
  5. mkdir -p /opt/api-location && \
  6. mkdir -p /opt/api-websocket && \
  7. mkdir -p /opt/app-gateway
  8. cp -f ./api-user/api-user.service /etc/systemd/system/api-user.service && \
  9. cp -f ./api-message/api-message.service /etc/systemd/system/api-message.service && \
  10. cp -f ./api-location/api-location.service /etc/systemd/system/api-location.service && \
  11. cp -f ./api-websocket/api-websocket.service /etc/systemd/system/api-websocket.service && \
  12. cp -f ./app-gateway/app-gateway.service /etc/systemd/system/app-gateway.service && \
  13. sudo systemctl daemon-reload
  14. gateway: init
  15. ./gradlew :app-gateway:clean :app-gateway:bootJar
  16. cp ./app-gateway/build/libs/app-gateway-1.0.1.jar /opt/app-gateway/app-gateway.jar
  17. sudo systemctl restart app-gateway
  18. user: init
  19. ./gradlew :api-user:clean :api-user:bootJar
  20. cp ./api-user/build/libs/api-user-1.0.1.jar /opt/api-user/api-user.jar
  21. sudo systemctl restart api-user
  22. message: init
  23. ./gradlew :api-message:clean :api-message:bootJar
  24. cp ./api-message/build/libs/api-message-1.0.1.jar /opt/api-message/api-message.jar
  25. sudo systemctl restart api-message
  26. location: init
  27. ./gradlew :api-location:clean :api-location:bootJar
  28. cp ./api-location/build/libs/api-location-1.0.1.jar /opt/api-location/api-location.jar
  29. sudo systemctl restart api-location
  30. websocket: init
  31. ./gradlew :api-websocket:clean :api-websocket:bootJar
  32. cp ./api-websocket/build/libs/api-websocket-1.0.1.jar /opt/api-websocket/api-websocket.jar
  33. sudo systemctl restart api-websocket