File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Git and local env
2+ .git
3+ .gitignore
4+ .env
5+ .env. *
6+
7+ # Local DB data and caches (never belong in the image build context)
8+ .dbdata
9+ ** /.dbdata
10+
11+ # Coverage / IDE
12+ coverage.out
13+ coverage.html
14+ .cursor
15+ .idea
16+ .vscode
17+
18+ # Python (e2e / tooling)
19+ __pycache__
20+ .pytest_cache
21+ .venv
22+ venv
23+
24+ # Vendored deps — image uses `go mod download` in the builder stage
25+ vendor /
26+
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ FROM debian:bookworm-slim AS runtime
2020
2121WORKDIR /app
2222
23+ RUN apt-get update \
24+ && apt-get install -y --no-install-recommends ca-certificates curl \
25+ && rm -rf /var/lib/apt/lists/*
26+
2327RUN useradd --system --no-create-home --uid 10001 appuser
2428
2529COPY --from=builder /out/server /app/server
@@ -29,6 +33,9 @@ ENV GIN_MODE=release
2933
3034USER appuser
3135
32- EXPOSE 8080
36+ EXPOSE 8001
37+
38+ HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
39+ CMD curl -fsS http://127.0.0.1:8001/api/v1/ >/dev/null || exit 1
3340
3441CMD ["/app/server" ]
You can’t perform that action at this time.
0 commit comments