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 "$@"