Skip to content

Commit 7a7593a

Browse files
authored
Merge pull request #22 from narvanalabs/dev
fix: include static assets in web container and improve IP detection
2 parents ce03c4c + 08b7b4d commit 7a7593a

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

deploy/Containerfile.web

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,24 @@ RUN cd web && /usr/local/bin/tailwindcss -i ./assets/css/input.css -o ./assets/c
3737

3838
RUN CGO_ENABLED=0 GOOS=linux go build \
3939
-ldflags="-s -w -X main.Version=${VERSION}" \
40-
-o /web ./cmd/web
40+
-o /narvana-web ./cmd/web
4141

4242
# Runtime - Alpine is fine here since we're running a static Go binary
4343
FROM docker.io/library/alpine:3.20
4444

4545
RUN apk add --no-cache ca-certificates curl
4646

47-
COPY --from=builder /web /usr/local/bin/web
47+
# Create app directory
48+
WORKDIR /app
49+
50+
# Copy binary
51+
COPY --from=builder /narvana-web /app/narvana-web
52+
53+
# Copy static assets (CSS, JS) - must match the path the binary expects: "web/assets"
54+
COPY --from=builder /build/web/assets /app/web/assets
4855

4956
EXPOSE 8090
5057

5158
USER nobody:nobody
5259

53-
ENTRYPOINT ["/usr/local/bin/web"]
60+
ENTRYPOINT ["/app/narvana-web"]

scripts/install.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,12 @@ wait_for_healthy() {
168168
# -----------------------------------------------------------------------------
169169

170170
print_success() {
171-
PUBLIC_IP=$(curl -sf --max-time 5 https://ifconfig.me 2>/dev/null || echo "localhost")
171+
# Try multiple services to get public IP
172+
PUBLIC_IP=$(curl -sf --max-time 3 https://ifconfig.me 2>/dev/null || \
173+
curl -sf --max-time 3 https://api.ipify.org 2>/dev/null || \
174+
curl -sf --max-time 3 https://icanhazip.com 2>/dev/null || \
175+
hostname -I 2>/dev/null | awk '{print $1}' || \
176+
echo "YOUR_SERVER_IP")
172177

173178
echo ""
174179
echo -e "${GREEN}${BOLD}╔════════════════════════════════════════════════════════════════╗${NC}"

0 commit comments

Comments
 (0)