Scaffold Cloudron packaging workspace

This commit is contained in:
2025-10-02 13:39:36 -05:00
parent 482d4ff1b8
commit fe0ade1dd9
366 changed files with 4035 additions and 2493 deletions

View File

@@ -1,21 +1,38 @@
# syntax=docker/dockerfile:1
FROM cloudron/base:5.0.0
# syntax=docker/dockerfile:1.6
ARG APP_VERSION=latest
FROM cloudron/base:5.0.0 AS builder
WORKDIR /build
# -----------------------------------------------------------------------------
# TODO: Fetch and build Wireviz Web
# Example:
# RUN git clone --depth 1 --branch "${APP_VERSION}" https://github.com/wireviz/wireviz-web.git source \
# && cd source \
# && npm ci \
# && npm run build
# -----------------------------------------------------------------------------
FROM cloudron/base:5.0.0
LABEL org.opencontainers.image.source="https://github.com/wireviz/wireviz-web.git"
LABEL org.opencontainers.image.description="Cloudron package for Wireviz Web"
ARG APP_VERSION
ENV APP_VERSION=${APP_VERSION:-latest}
ENV APP_VERSION=${APP_VERSION}
# -----------------------------------------------------------------------------
# TODO: Copy build artefacts from the builder stage
# COPY --from=builder /build/source/dist /app/code
# -----------------------------------------------------------------------------
# Copy application source into image at build time
# Replace this with a multi-stage build if upstream provides Docker images.
COPY ./app /app/code
# Copy start script and make it executable
COPY ./start.sh /app/pkg/start.sh
RUN chmod +x /app/pkg/start.sh
COPY ./test /app/pkg/test
RUN chmod +x /app/pkg/start.sh /app/pkg/test/smoke.sh \
&& mkdir -p /app/data \
&& chown -R cloudron:cloudron /app
# Cloudron expects all processes to run as cloudron user
USER cloudron
WORKDIR /app/code