File size: 876 Bytes
cfb5074
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM node:22-bookworm-slim AS builder
WORKDIR /workspace

COPY apps/web_comercial ./apps/web_comercial
COPY packages/simulation-engine ./packages/simulation-engine

RUN npm ci --prefix apps/web_comercial
RUN npm --prefix apps/web_comercial run build

FROM node:22-bookworm-slim AS runner
WORKDIR /workspace
ENV NODE_ENV=production
ENV PORT=7860
ENV HOSTNAME=0.0.0.0

# Install Dev Mode requirements
RUN apt-get update && \
    apt-get install -y \
      bash \
      git git-lfs \
      wget curl procps \
      htop vim nano openssh-client && \
    rm -rf /var/lib/apt/lists/*

COPY --from=builder /workspace/apps/web_comercial ./apps/web_comercial
COPY --from=builder /workspace/packages/simulation-engine ./packages/simulation-engine

RUN chown -R 1000:1000 /workspace
USER 1000

EXPOSE 7860
CMD ["sh", "-c", "cd apps/web_comercial && npm run start -- -H 0.0.0.0 -p 7860"]