-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (32 loc) · 959 Bytes
/
Dockerfile
File metadata and controls
40 lines (32 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
ARG NODE_VERSION=20-alpine3.18
FROM node:${NODE_VERSION}
RUN apk --no-cache add git ruby
# Create app directory
RUN mkdir -p /usr/src/app/.nuxt
WORKDIR /usr/src/app
RUN corepack enable
# Install app dependencies
COPY package.json yarn.lock .yarnrc.yml /usr/src/app/
RUN yarn install && yarn cache clean
COPY . /usr/src/app
RUN yarn build-fixture
# Sentry sourcemap upload requires these at build time
ARG SENTRY_AUTH_TOKEN
ARG SENTRY_ORG
ARG SENTRY_PROJECT
ARG SENTRY_URL
ENV NODE_OPTIONS="--openssl-legacy-provider"
RUN yarn build
# Set environment variables
ENV NODE_ENV="production"
ENV NUXT_HOST="0.0.0.0"
ENV NUXT_PORT="3000"
EXPOSE 3000
CMD [ "node", "--import", "./.output/server/sentry.server.config.mjs", ".output/server/index.mjs" ]
HEALTHCHECK \
--start-interval=1s \
--start-period=30s \
--interval=30s \
--timeout=20s \
--retries=5 \
CMD wget --no-verbose --tries=1 -O /dev/null http://localhost:3000/up || exit 1