38 lines
940 B
Docker
38 lines
940 B
Docker
FROM cloudron/base:5.0.0
|
|
|
|
MAINTAINER Cloudron Support <support@cloudron.io>
|
|
|
|
# Install Node.js 20 and pnpm
|
|
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
|
apt-get install -y nodejs && \
|
|
npm install -g pnpm@latest
|
|
|
|
# Set up application directory
|
|
WORKDIR /app/code
|
|
|
|
# Clone and build Docmost
|
|
RUN git clone https://github.com/docmost/docmost.git . && \
|
|
pnpm install && \
|
|
pnpm build
|
|
|
|
# Create necessary directories
|
|
RUN mkdir -p /tmp/data /app/data && \
|
|
chown -R cloudron:cloudron /app/data /tmp/data
|
|
|
|
# Copy startup scripts
|
|
COPY start.sh /app/code/
|
|
COPY nginx.conf /etc/nginx/sites-available/default
|
|
|
|
# Make scripts executable
|
|
RUN chmod +x /app/code/start.sh
|
|
|
|
# Install supervisord for process management
|
|
RUN apt-get update && \
|
|
apt-get install -y supervisor && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD [ "/app/code/start.sh" ] |