forked from liveblocks/liveblocks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (27 loc) · 1.3 KB
/
Dockerfile
File metadata and controls
38 lines (27 loc) · 1.3 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
# ------------------------------------------------------------------
# Liveblocks Dev Server — Docker Image
#
# docker build --build-arg CLI_VERSION=1.0.3 tools/liveblocks-cli/
# ------------------------------------------------------------------
FROM oven/bun:1-alpine@sha256:9028ee7a60a04777190f0c3129ce49c73384d3fc918f3e5c75f5af188e431981
ARG CLI_VERSION=latest
ARG VERSION=dev
LABEL org.opencontainers.image.source="https://github.com/liveblocks/liveblocks"
LABEL org.opencontainers.image.version="${VERSION}"
LABEL org.opencontainers.image.licenses="AGPL-3.0-or-later"
LABEL org.opencontainers.image.title="Liveblocks Dev Server"
LABEL org.opencontainers.image.description="Local development server for Liveblocks"
RUN addgroup -g 1001 liveblocks && \
adduser -u 1001 -G liveblocks -h /home/liveblocks -D liveblocks
WORKDIR /app
RUN bun install liveblocks@${CLI_VERSION}
COPY scripts/docker-healthcheck.ts ./scripts/
RUN mkdir -p /app/.liveblocks && chown liveblocks:liveblocks /app/.liveblocks
VOLUME /app/.liveblocks
USER liveblocks
ENV LIVEBLOCKS_DEVSERVER_HOST=0.0.0.0
ENV LIVEBLOCKS_DEVSERVER_PORT=1153
EXPOSE 1153
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \
CMD ["bun", "run", "scripts/docker-healthcheck.ts"]
ENTRYPOINT ["bun", "run", "node_modules/liveblocks/dist/index.js"]