fix(rathole): update package to use correct Cloudron manifest format and fix configuration
- Update CloudronManifest.json to use modern format with proper ID, health check, and metadata
- Fix Dockerfile to follow Cloudron conventions (/app/code, /app/data structure)
- Correct Rathole configuration format (default_token instead of token, add services section)
- Fix start.sh to use proper --server flag syntax
- Add health check endpoint on port 8080
- Create comprehensive build notes documentation
- Successfully build and test package - both ports 2333 (Rathole) and 8080 (health) working
🤖 Generated with assistance from OpenCode for code optimization and testing
This commit is contained in:
@@ -1,32 +1,37 @@
|
||||
FROM cloudron/base:4.2.0
|
||||
|
||||
# Install necessary tools for downloading and unzipping
|
||||
# Install necessary tools
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
unzip \
|
||||
python3 \
|
||||
--no-install-recommends && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Download and extract Rathole
|
||||
ARG RATHOLE_VERSION=v0.5.0
|
||||
ARG ARCH=x86_64-unknown-linux-gnu
|
||||
ARG FILENAME=rathole-${ARCH}.zip
|
||||
ARG DOWNLOAD_URL=https://github.com/rathole-org/rathole/releases/download/${RATHOLE_VERSION}/${FILENAME}
|
||||
# Set up directory structure following Cloudron conventions
|
||||
RUN mkdir -p /app/code /app/data
|
||||
|
||||
RUN curl -L ${DOWNLOAD_URL} -o /tmp/${FILENAME} && \
|
||||
unzip /tmp/${FILENAME} -d /tmp/rathole && \
|
||||
mv /tmp/rathole/rathole /usr/local/bin/rathole && \
|
||||
rm -rf /tmp/${FILENAME} /tmp/rathole
|
||||
# Download and extract Rathole (using a more reliable approach)
|
||||
RUN cd /tmp && \
|
||||
curl -L -o rathole.zip https://github.com/rathole-org/rathole/releases/download/v0.5.0/rathole-x86_64-unknown-linux-gnu.zip && \
|
||||
unzip rathole.zip && \
|
||||
mv rathole /app/code/ && \
|
||||
chmod +x /app/code/rathole && \
|
||||
rm -f rathole.zip
|
||||
|
||||
# Create a directory for configuration
|
||||
RUN mkdir -p /app/data
|
||||
# Copy start script
|
||||
COPY start.sh /app/code/start.sh
|
||||
RUN chmod +x /app/code/start.sh
|
||||
|
||||
# Set permissions
|
||||
RUN chmod +x /usr/local/bin/rathole
|
||||
# Set proper permissions
|
||||
RUN chown -R cloudron:cloudron /app/code /app/data
|
||||
|
||||
WORKDIR /app/data
|
||||
# Configure working directory and user
|
||||
WORKDIR /app/code
|
||||
USER cloudron
|
||||
|
||||
# Expose the default Rathole server port
|
||||
EXPOSE 2333
|
||||
# Expose ports
|
||||
EXPOSE 2333 8080
|
||||
|
||||
CMD ["/usr/local/bin/rathole", "-c", "/app/data/rathole.toml"]
|
||||
# Start the application
|
||||
CMD ["/app/code/start.sh"]
|
||||
|
Reference in New Issue
Block a user