chromatic/Dockerfile

24 lines
337 B
Docker
Raw Normal View History

2024-02-12 12:15:50 +00:00
FROM oven/bun
2024-02-12 13:49:13 +00:00
# Build client
WORKDIR /app/client
COPY client .
RUN bun install
RUN bunx --bun vite build
2024-02-12 12:15:50 +00:00
2024-02-12 13:49:13 +00:00
WORKDIR /app
2024-02-12 12:15:50 +00:00
2024-02-12 13:49:13 +00:00
RUN mv client/build public
RUN rm -rf client
2024-02-12 12:15:50 +00:00
2024-02-12 13:49:13 +00:00
COPY server src
RUN mv src/package.json package.json
2024-02-12 12:15:50 +00:00
COPY tsconfig.json .
2024-02-12 13:49:13 +00:00
RUN bun install --production
2024-02-12 12:15:50 +00:00
ENV NODE_ENV production
CMD ["bun", "src/index.ts"]
EXPOSE 3000