Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions docker/matterjs-server/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,21 @@ COPY packages/dashboard/package*.json ./packages/dashboard/
COPY packages/matter-server/package*.json ./packages/matter-server/

# Install dependencies
RUN npm ci
RUN npm ci --ignore-scripts
Comment thread
rspier marked this conversation as resolved.

# Copy source code
COPY . .

# Build all packages
RUN npm run build

# Initialize data volume with user permissions
RUN mkdir -p /data && chown -R 1000:1000 /data

# Environment variables with defaults
ENV LOG_LEVEL=info
ENV STORAGE_PATH=/data

# Data volume for persistent storage
VOLUME ["/data"]

Expand All @@ -53,7 +60,10 @@ COPY --chmod=0755 docker/matterjs-server/healthcheck.sh /usr/local/bin/healthche
HEALTHCHECK --interval=60s --timeout=10s --start-period=30s --start-interval=5s --retries=3 \
CMD ["/usr/local/bin/healthcheck.sh"]

# Run as non-root user
USER 1000:1000

# Run the matter server with data stored in /data
# --enable-source-maps provides better stack traces in error logs
ENTRYPOINT ["node", "--enable-source-maps", "packages/matter-server/dist/esm/MatterServer.js"]
CMD ["--storage-path", "/data"]
CMD []
Loading