Repository navigation
Expand file tree
/
Copy pathDockerfile.dev
More file actions
46 lines (36 loc) · 1.47 KB
/
Copy pathDockerfile.dev
File metadata and controls
46 lines (36 loc) · 1.47 KB
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
41
42
43
44
45
46
FROM temporalio/auto-setup:1.29.3 AS temporal
FROM node:22.20-bookworm-slim
ARG NEXT_PUBLIC_VERSION
ENV NEXT_PUBLIC_VERSION=$NEXT_PUBLIC_VERSION
ARG NEXT_PUBLIC_BACKEND_URL
ENV NEXT_PUBLIC_BACKEND_URL=$NEXT_PUBLIC_BACKEND_URL
RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
make \
python3-pip \
bash \
netcat-openbsd \
nginx \
procps \
&& rm -rf /var/lib/apt/lists/*
RUN addgroup --system www \
&& adduser --system --ingroup www --home /www --shell /usr/sbin/nologin www \
&& mkdir -p /www \
&& chown -R www:www /www /var/lib/nginx
RUN npm --no-update-notifier --no-fund --global install pnpm@10.6.1 pm2
WORKDIR /app
COPY . /app
COPY var/docker/nginx.conf /etc/nginx/nginx.conf
RUN pnpm install
RUN NODE_OPTIONS="--max-old-space-size=4096" pnpm run build
# Next.js standalone requires static assets and public files alongside the server
RUN cp -r apps/frontend/public apps/frontend/.next/standalone/apps/frontend/public && \
cp -r apps/frontend/.next/static apps/frontend/.next/standalone/apps/frontend/.next/static
COPY --from=temporal /usr/local/bin/temporal /usr/local/bin/
COPY --from=temporal /usr/local/bin/temporal-server /usr/local/bin/
COPY --from=temporal /usr/local/bin/temporal-sql-tool /usr/local/bin/
COPY --from=temporal /usr/local/bin/dockerize /usr/local/bin/
COPY --from=temporal /etc/temporal/ /etc/temporal/
COPY var/docker/entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
CMD ["/app/entrypoint.sh"]