← Retour
FROM oven/bun:1-alpine
WORKDIR /app
# Copier les fichiers de dépendances
COPY package.json bun.lockb* ./
# Installer les dépendances
RUN bun install --frozen-lockfile --production
# Copier le code source
COPY . .
# Variables d'environnement par défaut
ENV NODE_ENV=production
ENV PORT=3000
EXPOSE ${PORT}
# Healthcheck
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:${PORT}/health || exit 1
CMD ["bun", "run", "start"]