forked from MusiCode1/obsidian-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (24 loc) · 804 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (24 loc) · 804 Bytes
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
FROM node:20-alpine
# Set the working directory
WORKDIR /app
# Copy the server package files first for better caching
COPY server/package*.json ./server/
# Install the server dependencies
RUN cd server && npm install
# Copy the rest of the application
COPY . .
# Run the update script to download Obsidian assets
# We use --no-cache to avoid storing the downloaded archive in the final image
RUN node scripts/update-obsidian.js --no-cache
# Expose the default port
EXPOSE 3000
# Set environment variables
ENV NODE_ENV=production
# Bind to all interfaces so the container can be accessed externally
ENV HOST=0.0.0.0
ENV PORT=3000
# Optional: You can set VAULT_PATH to mount your own vault
# ENV VAULT_PATH=/app/vault
# VOLUME /app/vault
# Start the Node.js server
CMD ["node", "server/index.js"]