diff --git a/.dockerignore b/.dockerignore index edb296c..feec617 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,3 +7,5 @@ apps/web/dist apps/api/dist packages/db/dist packages/types/dist +.turbo +screenshots/ diff --git a/apps/api/Dockerfile b/apps/api/Dockerfile index 1a89f85..fe0e0da 100644 --- a/apps/api/Dockerfile +++ b/apps/api/Dockerfile @@ -34,6 +34,9 @@ COPY --from=builder /app/packages/types/dist packages/types/dist RUN pnpm install --frozen-lockfile --prod EXPOSE 3000 +RUN apk add --no-cache curl +HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \ + CMD curl -f http://localhost:3000/health || exit 1 CMD ["node", "apps/api/dist/index.js"] # Migrate stage — runs drizzle-kit migrate against the database diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index 704730b..eb110fa 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -20,3 +20,5 @@ FROM nginx:alpine AS runner COPY apps/web/nginx.conf /etc/nginx/conf.d/default.conf COPY --from=builder /app/apps/web/dist /usr/share/nginx/html EXPOSE 80 +HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \ + CMD curl -f http://localhost:80/ || exit 1