From 6a186e0c9c060d4568488de0460e5a34fdc1d943 Mon Sep 17 00:00:00 2001 From: Trezy Date: Fri, 26 Jun 2026 10:51:33 -0500 Subject: [PATCH] build: add cargo-watch for better dev experience Signed-off-by: Trezy Signed-off-by: Trezy --- docker-compose.yml | 6 ++++-- scripts/entrypoint.sh | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 301bda2..a2c843f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,7 +23,7 @@ services: image: rust:1.93 working_dir: /app entrypoint: ["sh", "/scripts/entrypoint.sh"] - command: cargo run + command: cargo watch -x run ports: - "3000:3000" volumes: @@ -68,7 +68,9 @@ services: TUNNEL_URL_FILE: /shared/tunnel-url TUNNEL_UPSTREAM: http://caddy:80 depends_on: - - caddy + caddy: + condition: service_started + restart: true restart: unless-stopped web: diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index f84948c..4b1dc35 100755 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -22,4 +22,9 @@ if [ -n "$TUNNEL_URL_FILE" ]; then fi fi +if ! command -v cargo-watch >/dev/null 2>&1; then + echo "Installing cargo-watch..." + cargo install cargo-watch +fi + exec "$@" -- 2.51.2