2024-05-06 19:27:07 +00:00
|
|
|
DOCKER_TEMP_DIR=temp
|
|
|
|
|
|
|
|
all: frontend backend
|
|
|
|
|
|
|
|
frontend:
|
|
|
|
cd remote_frontend && npm run build && cd ..
|
|
|
|
rm -rf remote_backend/static
|
|
|
|
mv remote_frontend/dist remote_backend/static
|
|
|
|
|
|
|
|
backend: frontend
|
|
|
|
cd remote_backend && cargo clippy -- -D warnings && cargo build --release
|
|
|
|
|
|
|
|
backend_docker: backend
|
|
|
|
rm -rf $(DOCKER_TEMP_DIR)
|
|
|
|
mkdir $(DOCKER_TEMP_DIR)
|
|
|
|
cp remote_backend/target/release/remote_backend $(DOCKER_TEMP_DIR)
|
2024-05-06 19:41:11 +00:00
|
|
|
docker build -t pierre42100/virtweb_remote -f remote_backend/Dockerfile "$(DOCKER_TEMP_DIR)"
|
2024-05-06 19:27:07 +00:00
|
|
|
rm -rf $(DOCKER_TEMP_DIR)
|
|
|
|
|