first cut of home chart

This commit is contained in:
2025-04-21 14:30:02 -04:00
parent 34990a9162
commit f37ea77870
10 changed files with 315 additions and 4 deletions

View File

@ -0,0 +1,40 @@
{
"id": "app.homechart.cloudron",
"title": "HomeChart",
"author": "HomeChart Package Maintainer",
"description": "Your all-in-one household management platform. Organize calendars, budgets, shopping lists, and more in one place. Enjoy features like shared calendars, meal planning, task management, and multilingual support. Secure, private, and ad-free.",
"tagline": "Your Family's Mission Control",
"version": "1.0.0",
"upstreamVersion": "2024.09.0",
"healthCheckPath": "/",
"httpPort": 3000,
"memoryLimit": 512,
"addons": {
"localstorage": {},
"postgresql": {
"version": "16"
}
},
"tags": [
"household",
"family",
"organization",
"calendar",
"budget",
"tasks"
],
"postInstallMessage": "HomeChart has been installed successfully! You can now access your family's mission control panel.\n\nThe default administrator credentials are:\nUsername: admin@example.com\nPassword: changeme\n\nPlease login and change these credentials immediately.",
"manifestVersion": 2,
"website": "https://homechart.app/",
"contactEmail": "support@example.com",
"icon": "file://logo.png",
"minBoxVersion": "5.4.0",
"forumUrl": "https://forum.cloudron.io/",
"documentationUrl": "https://homechart.app/docs/",
"changelog": "Initial Cloudron package for HomeChart",
"configurePath": "/settings",
"oauth": {
"loginRedirectUri": "/oidc",
"scope": "openid email profile"
}
}

View File

@ -0,0 +1,45 @@
FROM cloudron/base:4.2.0
# Install required dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
supervisor \
nginx \
tzdata \
gosu && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Create the application directory structure
RUN mkdir -p /app/code /app/data /run/nginx
# Create homechart data directories structure
RUN mkdir -p /tmp/data
# Download the latest HomeChart release
RUN curl -L -o /app/code/homechart.tar.gz https://github.com/candiddev/homechart/releases/latest/download/homechart_linux_amd64.tar.gz && \
tar -xzf /app/code/homechart.tar.gz -C /app/code && \
rm /app/code/homechart.tar.gz && \
mv /app/code/homechart_linux_amd64 /app/code/homechart && \
chmod +x /app/code/homechart
# Add NGINX configuration
COPY nginx.conf /etc/nginx/sites-enabled/homechart.conf
RUN rm -f /etc/nginx/sites-enabled/default
# Add Supervisor configuration
COPY supervisor.conf /etc/supervisor/conf.d/homechart.conf
# Add the startup script
COPY start.sh /app/code/
RUN chmod +x /app/code/start.sh
# Set permissions
RUN chown -R cloudron:cloudron /app/code /app/data /run/nginx
# Expose the port (should match the httpPort in the CloudronManifest.json)
EXPOSE 3000
CMD ["/app/code/start.sh"]

View File

@ -0,0 +1,107 @@
# HomeChart Cloudron Package - Build Notes
This document provides instructions for building, testing, and deploying the HomeChart Cloudron package.
## Prerequisites
1. A running Cloudron instance
2. Docker installed on your local machine
3. Cloudron CLI tool installed (`npm install -g cloudron`)
4. Git for cloning the repository
## Files Overview
- **CloudronManifest.json**: Contains metadata and configuration for the Cloudron app
- **Dockerfile**: Defines how to build the Docker image for HomeChart
- **start.sh**: Startup script that handles initialization and configuration
- **nginx.conf**: NGINX configuration for proxying requests
- **supervisor.conf**: Supervisor configuration for process management
## Building and Deploying
### Step 1: Clone the repository
```bash
git clone https://github.com/yourusername/homechart-cloudron.git
cd homechart-cloudron
```
### Step 2: Build the Docker image
```bash
# Login to Docker Hub if not already logged in
docker login
# Build the image
cloudron build
```
When prompted, enter a repository name in the format `username/homechart` where `username` is your Docker Hub username.
### Step 3: Install on your Cloudron
```bash
# Install the app
cloudron install —image username/homechart:latest
```
Youll be prompted to select a subdomain for the app.
### Step 4: Configure the app
After installation, youll need to:
1. Log in using the default credentials provided in the post-install message
2. Change the default administrator password
3. Set up your household and invite family members
## Updating the App
To update the app after making changes:
```bash
# Rebuild the Docker image
cloudron build
# Update the installed app
cloudron update —app homechart
```
## Authentication
HomeChart is configured to use Cloudrons OIDC provider for authentication. Users from your Cloudron instance can log in to HomeChart using their Cloudron credentials.
## Data Persistence
All HomeChart data is stored in:
- PostgreSQL database (managed by Cloudron)
- `/app/data` directory (backed up by Cloudron)
## Troubleshooting
### View logs
```bash
cloudron logs -f —app homechart
```
### Database access
To access the PostgreSQL database directly:
```bash
cloudron exec —app homechart
psql -U “$CLOUDRON_POSTGRESQL_USERNAME” -h “$CLOUDRON_POSTGRESQL_HOST” “$CLOUDRON_POSTGRESQL_DATABASE
```
### Common Issues
- **OIDC configuration issues**: Ensure the Cloudron environment variables are correctly passed to the app
- **Database connection errors**: Check PostgreSQL connection details in the app config
- **Memory limits**: If the app crashes due to memory issues, increase the memory limit in the CloudronManifest.json
## Resources
- [HomeChart Documentation](https://homechart.app/docs/)
- [Cloudron Documentation](https://docs.cloudron.io/)
- [HomeChart GitHub Repository](https://github.com/candiddev/homechart)

View File

@ -1 +0,0 @@
#homechart docker compose for tsys

View File

@ -1 +0,0 @@
This directory contains template files for the application at FQDN indidicated by the parent directory. They will be processed using mo (bash mustache).

View File

@ -0,0 +1,42 @@
server {
listen 3000;
server_name localhost;
# Add proper headers for running behind Cloudron's proxy
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 100M;
# Custom Cloudron error pages
error_page 403 /error/403.html;
error_page 404 /error/404.html;
error_page 50x /error/50x.html;
location ^~ /error/ {
alias /app/code/public/error/;
internal;
}
# Use Cloudron's runtime directory for nginx (read-only filesystem)
client_body_temp_path /run/nginx/body;
proxy_temp_path /run/nginx/proxy;
fastcgi_temp_path /run/nginx/fastcgi;
uwsgi_temp_path /run/nginx/uwsgi;
scgi_temp_path /run/nginx/scgi;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
}
# Needed for Cloudron's health checks
location = /healthcheck {
access_log off;
return 200;
}
}

View File

@ -1 +0,0 @@
This directory contains final docker compose files for the application at FQDN indidicated by the parent directory.

View File

@ -0,0 +1,53 @@
#!/bin/bash
set -e
# Create required runtime directories
mkdir -p /run/nginx/body /run/nginx/proxy /run/nginx/fastcgi /run/nginx/uwsgi /run/nginx/scgi
chown -R cloudron:cloudron /run/nginx
# Initialize data directory if not existing
if [ ! -d "/app/data/config" ]; then
mkdir -p /app/data/config
chown -R cloudron:cloudron /app/data
fi
# Configuration
CONFIG_FILE="/app/data/config/homechart.json"
if [ ! -f "$CONFIG_FILE" ]; then
echo "Creating initial configuration file..."
cat > "$CONFIG_FILE" <<EOL
{
"app": {
"baseURL": "${CLOUDRON_APP_ORIGIN}",
"proxyAddr": "127.0.0.1, 172.18.0.1"
},
"postgresql": {
"hostname": "${CLOUDRON_POSTGRESQL_HOST}",
"username": "${CLOUDRON_POSTGRESQL_USERNAME}",
"password": "${CLOUDRON_POSTGRESQL_PASSWORD}",
"database": "${CLOUDRON_POSTGRESQL_DATABASE}"
},
"oidc": {
"cloudron": {
"clientID": "${CLOUDRON_OIDC_CLIENT_ID}",
"clientSecret": "${CLOUDRON_OIDC_CLIENT_SECRET}",
"displayName": "Cloudron",
"oidcIssuerURL": "${CLOUDRON_OIDC_ISSUER}"
}
},
"logging": {
"level": "info"
}
}
EOL
chown cloudron:cloudron "$CONFIG_FILE"
fi
# Link HomeChart configuration
export HOMECHART_CONFIG_FILE="$CONFIG_FILE"
# Set the port for HomeChart to run on (internal port)
export HOMECHART_APP_PORT=8000
# Start supervisor which manages nginx and homechart
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf

View File

@ -0,0 +1,28 @@
[supervisord]
nodaemon=true
logfile=/dev/null
logfile_maxbytes=0
pidfile=/var/run/supervisord.pid
[program:nginx]
priority=10
command=nginx -g "daemon off;"
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:homechart]
priority=20
directory=/app/code
command=/app/code/homechart
user=cloudron
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
environment=HOME="/app/data"

View File

@ -1 +0,0 @@
This directory contains files from the vendor unmodified. They serve as a base for the input-files sibling directory