forked from event-catalog/eventcatalog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.server
More file actions
47 lines (34 loc) · 1.2 KB
/
Dockerfile.server
File metadata and controls
47 lines (34 loc) · 1.2 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
47
# This docker file is used for project development only.
# If you are looking for your Docker File for SSR you can find one in our docs: https://www.eventcatalog.dev/docs/development/deployment/hosting-options
# If you want to locally reproduce any SSR / Docker bugs, use this docker file
# FOR DEVELOPMENT ONLY, DO NOT USE THIS FOR PRODUCTION
FROM node:20.19.6-trixie-slim AS runtime
WORKDIR /app
# Install pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
# Copy package files
COPY package.json pnpm-lock.yaml ./
# Copy the rest of the app
COPY eventcatalog ./eventcatalog
COPY examples/default ./examples/default
COPY src ./src
COPY scripts ./scripts
COPY tsup.config.js ./tsup.config.js
COPY . .
ENV PNPM_HOME=/usr/local/pnpm
ENV PATH=$PNPM_HOME:$PATH
RUN mkdir -p $PNPM_HOME \
&& pnpm config set global-bin-dir $PNPM_HOME \
&& pnpm add -g cross-env
RUN pnpm install
RUN pnpm run build:bin
# Fix for Astro in Docker: https://github.com/withastro/astro/issues/2596
ENV NODE_OPTIONS=--max_old_space_size=4096
ENV HOST=0.0.0.0
ENV PORT=3000
EXPOSE 3000
RUN echo "HELLO"
RUN pnpm run verify-build:catalog
# Start the server
#
CMD cd examples/default && node ../../dist/eventcatalog.js start