Skip to main content

Hosting

Hosting Options

EventCatalog can be hosted in two ways:

Hosting a static website

By default EventCatalog will build a static website.

Here are some guides and places you can host static content

Community posts

Hosting static website with Docker

EventCatalog comes with a DockerFile you can build the image and deploy the container. The container exposes ports 3000.

To build the docker container you need to run:

# Builds the container
docker build -t eventcatalog .

# Runs the container locally
docker run -p 3000:80 -it eventcatalog

Hosting as a server

First you need to update your eventcatalog.config.js file to use SSR mode.

eventcatalog.config.js
export default {
// defaults to static
output: 'server',
}

A server output is required if you are using any EventCatalog feature that requires a server, these include:

You can use the server Docker image to run the server, this is the recommended way to run the server.

First you need to create a Dockerfile for the server (if you don't already have one).

/Dockerfile.server
FROM node:lts AS runtime
WORKDIR /app

# Install dependencies
COPY package.json package-lock.json ./
RUN npm install

COPY . .

# Fix for Astro in Docker: https://github.com/withastro/astro/issues/2596
ENV NODE_OPTIONS=--max_old_space_size=2048
RUN npm run build

ENV HOST=0.0.0.0
ENV PORT=3000
EXPOSE 3000

# Start the server
CMD npm run start

Then you can build the docker image with:

docker build -f Dockerfile.server -t eventcatalog-server .

Then you can run the server with:

docker run -p 3000:3000 eventcatalog-server
"Why do I need a server to run EventCatalog?"

Some features of EventCatalog require a server to run (e.g. EventCatalog Chat and EventCatalog Authentication).

If you have a large catalog, you may want to use SSR mode to reduce build times.