Prepara versao dev 1.0
This commit is contained in:
28
frontend-aggios.app/Dockerfile
Normal file
28
frontend-aggios.app/Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
# Build stage
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Runtime stage
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
COPY --from=builder /app/.next ./.next
|
||||
COPY --from=builder /app/public ./public
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||
CMD node -e "require('http').get('http://localhost:3000', (res) => { if (res.statusCode !== 200) { throw new Error('Status ' + res.statusCode); } }).on('error', (err) => { throw err; });"
|
||||
|
||||
CMD ["npm", "start"]
|
||||
Reference in New Issue
Block a user