Initial Blinko Cloudron package

- CloudronManifest.json with PostgreSQL and localstorage addons
- Dockerfile based on cloudron/base:5.0.0
- NGINX reverse proxy configuration
- Supervisor process management
- Initialization script with auto-configuration
This commit is contained in:
2025-12-29 15:50:37 -06:00
commit 9a1bb3d3bc
9 changed files with 539 additions and 0 deletions

67
Dockerfile Normal file
View File

@@ -0,0 +1,67 @@
FROM cloudron/base:5.0.0
# Install Bun for building
RUN curl -fsSL https://bun.sh/install | bash
ENV PATH="/root/.bun/bin:${PATH}"
# Set up working directory
WORKDIR /app/code
# Clone Blinko repository
ARG BLINKO_VERSION=main
RUN git clone --depth 1 --branch ${BLINKO_VERSION} https://github.com/blinkospace/blinko.git /tmp/blinko
# Build the application
WORKDIR /tmp/blinko
# Install dependencies with Bun
RUN bun install --frozen-lockfile
# Handle Sharp for native image processing
RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then \
bun add sharp@0.34.1 --arch=arm64 --platform=linux; \
fi
# Generate Prisma client
RUN bunx prisma generate
# Build the application
RUN bun run build:web
RUN bun run build:seed
# Copy built application to /app/code
WORKDIR /app/code
RUN cp -r /tmp/blinko/dist /app/code/dist && \
cp -r /tmp/blinko/server /app/code/server && \
cp -r /tmp/blinko/prisma /app/code/prisma && \
cp -r /tmp/blinko/node_modules /app/code/node_modules && \
cp /tmp/blinko/package.json /app/code/package.json
# Copy public assets if they exist
RUN if [ -d /tmp/blinko/public ]; then cp -r /tmp/blinko/public /app/code/public; fi
# Set up initial data directory template
RUN mkdir -p /tmp/data/.blinko
# Install dumb-init
RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then \
DUMB_INIT_ARCH="aarch64"; \
else \
DUMB_INIT_ARCH="x86_64"; \
fi && \
curl -Lo /usr/local/bin/dumb-init "https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_${DUMB_INIT_ARCH}" && \
chmod +x /usr/local/bin/dumb-init
# Clean up
RUN rm -rf /tmp/blinko
# Copy Cloudron configuration files
COPY start.sh /app/code/start.sh
COPY nginx.conf /app/code/nginx.conf
COPY supervisor/ /app/code/supervisor/
RUN chmod +x /app/code/start.sh
CMD ["/app/code/start.sh"]