Deploying Galette
Introduction
Galette is a free, open-source membership management web application designed for non-profit organizations, associations, clubs, and community groups. Built with PHP, Galette provides a comprehensive suite of tools for managing members, tracking contributions and dues, handling mailings, generating reports, and maintaining detailed records of your organization’s membership activities.
Originally developed by the French community, Galette has grown into a mature, feature-rich platform used by thousands of organizations worldwide. The name “Galette” comes from the French word for a flat, round cake—symbolizing the community gathering aspect the software enables.
Key Features
- Member Management: Comprehensive member profiles with customizable fields, photos, statuses, and categories
- Contribution Tracking: Track membership fees, donations, and other contributions with detailed payment histories
- Mailing System: Built-in tools for sending bulk emails and generating mailing labels
- PDF Generation: Create membership cards, contribution receipts, labels, and custom documents
- Import/Export: Import members from CSV files and export data for external processing
- Multi-language Support: Available in numerous languages including English, French, German, Spanish, and more
- Plugin Architecture: Extend functionality with official and community plugins for events, maps, activities, and auto-billing
- Customizable Fields: Add unlimited dynamic fields to adapt Galette to your organization’s needs
- Access Control: Role-based permissions for administrators, staff, and group managers
- Template System: Customize emails, receipts, and documents with built-in templating
Why Deploy Galette on Klutch.sh?
- Simplified Deployment: Deploy directly from your GitHub repository with automatic Dockerfile detection
- Persistent Storage: Attach volumes to preserve member photos, documents, and uploaded files
- Database Flexibility: Connect to MySQL, MariaDB, or PostgreSQL databases
- Custom Domains: Map your organization’s domain to your Galette instance
- Secure Infrastructure: Production-grade hosting with HTTPS encryption
- Scalable Resources: Adjust CPU and memory as your membership grows
- Cost-Effective: Affordable hosting for non-profit organizations and community groups
Prerequisites
Before deploying Galette on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your Galette deployment
- Basic understanding of Docker and environment variables
- A MySQL, MariaDB, or PostgreSQL database (can be deployed on Klutch.sh—see our MySQL guide or MariaDB guide)
What You’ll Deploy
By following this guide, you’ll have:
- A fully functional Galette installation running on Klutch.sh
- Persistent storage for member photos, documents, and application data
- Database connectivity for storing membership records
- Secure environment configuration with proper credentials management
- Production-ready setup with optimized PHP and Apache configurations
Understanding Galette Architecture
Galette follows a traditional LAMP-style architecture:
┌─────────────────────────────────────────────────────────────┐│ Web Browser ││ (Members & Admins) │└─────────────────────┬───────────────────────────────────────┘ │ HTTPS (Port 443) ▼┌─────────────────────────────────────────────────────────────┐│ Klutch.sh Platform ││ ┌──────────────────────┐ ││ │ Load Balancer │ ││ └──────────┬───────────┘ ││ │ Port 80 ││ ┌──────────▼───────────┐ ││ │ Galette Container │ ││ │ ┌────────────────┐ │ ││ │ │ Apache │ │ ││ │ │ + mod_php │ │ ││ │ └───────┬────────┘ │ ││ │ │ │ ││ │ ┌───────▼────────┐ │ ││ │ │ PHP 8.x │ │ ││ │ │ + Galette │ │ ││ │ └───────┬────────┘ │ ││ └──────────┼───────────┘ ││ │ ││ ┌────────────────────┼────────────────────┐ ││ │ │ │ ││ ▼ ▼ ▼ ││ ┌──────────┐ ┌──────────────┐ ┌──────────────┐ ││ │ MySQL/ │ │ Persistent │ │ SMTP │ ││ │ MariaDB/ │ │ Volume │ │ Server │ ││ │ PostgreSQL│ │ (uploads, │ │ (mailings) │ ││ └──────────┘ │ photos) │ └──────────────┘ ││ └──────────────┘ │└─────────────────────────────────────────────────────────────┘System Requirements:
- PHP 8.1+ with extensions: PDO, MySQL/PostgreSQL, GD, intl, mbstring, curl, openssl, xml, zip
- Apache or Nginx web server
- MySQL 5.7+, MariaDB 10.4+, or PostgreSQL 10+
- File storage for uploads, photos, and generated documents
Step 1: Prepare Your Repository
Create a new GitHub repository for your Galette deployment with the following structure:
galette-deployment/├── Dockerfile├── docker-entrypoint.sh├── apache-galette.conf├── php-galette.ini├── .dockerignore└── README.mdCreate the Dockerfile
Create a Dockerfile in your repository root:
FROM php:8.2-apache
LABEL maintainer="Your Organization <admin@yourorg.org>"LABEL description="Galette membership management software"
# Set environment variablesENV GALETTE_VERSION=1.1.0ENV APACHE_DOCUMENT_ROOT=/var/www/galette/galette
# Install system dependenciesRUN apt-get update && apt-get install -y \ libpng-dev \ libjpeg62-turbo-dev \ libfreetype6-dev \ libicu-dev \ libxml2-dev \ libzip-dev \ libpq-dev \ libcurl4-openssl-dev \ libonig-dev \ unzip \ curl \ wget \ git \ cron \ msmtp \ msmtp-mta \ && rm -rf /var/lib/apt/lists/*
# Configure and install PHP extensionsRUN docker-php-ext-configure gd --with-freetype --with-jpeg \ && docker-php-ext-install -j$(nproc) \ gd \ pdo \ pdo_mysql \ pdo_pgsql \ intl \ mbstring \ curl \ xml \ zip \ opcache \ gettext
# Enable Apache modulesRUN a2enmod rewrite headers expires deflate
# Download and install GaletteWORKDIR /var/wwwRUN wget -q "https://github.com/galette/galette/releases/download/${GALETTE_VERSION}/galette-${GALETTE_VERSION}.tar.bz2" \ && tar -xjf "galette-${GALETTE_VERSION}.tar.bz2" \ && rm "galette-${GALETTE_VERSION}.tar.bz2" \ && mv "galette-${GALETTE_VERSION}" galette
# Set proper permissionsRUN chown -R www-data:www-data /var/www/galette \ && chmod -R 755 /var/www/galette \ && chmod -R 775 /var/www/galette/galette/data \ && chmod -R 775 /var/www/galette/galette/config \ && chmod -R 775 /var/www/galette/galette/tempimages \ && chmod -R 775 /var/www/galette/galette/templates_c
# Copy custom configurationsCOPY apache-galette.conf /etc/apache2/sites-available/000-default.confCOPY php-galette.ini /usr/local/etc/php/conf.d/galette.iniCOPY docker-entrypoint.sh /usr/local/bin/
# Make entrypoint executableRUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Configure Apache document rootRUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \ && sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
# Create directories for persistent dataRUN mkdir -p /var/www/galette/galette/data/photos \ && mkdir -p /var/www/galette/galette/data/attachments \ && mkdir -p /var/www/galette/galette/data/exports \ && mkdir -p /var/www/galette/galette/data/imports \ && mkdir -p /var/www/galette/galette/data/tempimages \ && mkdir -p /var/www/galette/galette/data/logs \ && chown -R www-data:www-data /var/www/galette/galette/data
WORKDIR /var/www/galette/galette
EXPOSE 80
ENTRYPOINT ["docker-entrypoint.sh"]CMD ["apache2-foreground"]Create the Apache Configuration
Create apache-galette.conf:
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/galette/galette
<Directory /var/www/galette/galette> Options -Indexes +FollowSymLinks AllowOverride All Require all granted
# Security headers Header always set X-Content-Type-Options "nosniff" Header always set X-Frame-Options "SAMEORIGIN" Header always set X-XSS-Protection "1; mode=block" Header always set Referrer-Policy "strict-origin-when-cross-origin" </Directory>
# Deny access to sensitive directories <DirectoryMatch "^/var/www/galette/galette/(config|data|includes|lib|templates_c)/"> Require all denied </DirectoryMatch>
# Allow specific data subdirectories for public access <Directory /var/www/galette/galette/data/photos> Require all granted </Directory>
# Enable compression <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/json </IfModule>
# Enable caching for static assets <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/png "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/gif "access plus 1 month" ExpiresByType text/css "access plus 1 week" ExpiresByType application/javascript "access plus 1 week" </IfModule>
ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined</VirtualHost>Create the PHP Configuration
Create php-galette.ini:
; Galette PHP Configuration
; Memory and execution limitsmemory_limit = 256Mmax_execution_time = 300max_input_time = 300max_input_vars = 3000
; Upload settingsupload_max_filesize = 32Mpost_max_size = 48Mfile_uploads = On
; Session configurationsession.cookie_httponly = Onsession.cookie_secure = Onsession.use_strict_mode = Onsession.cookie_samesite = Strict
; Error handling (production settings)display_errors = Offdisplay_startup_errors = Offlog_errors = Onerror_log = /var/log/php_errors.logerror_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
; Date and timezonedate.timezone = UTC
; OPcache settingsopcache.enable = 1opcache.memory_consumption = 128opcache.interned_strings_buffer = 8opcache.max_accelerated_files = 10000opcache.revalidate_freq = 60opcache.fast_shutdown = 1opcache.enable_cli = 0
; Intl settingsintl.default_locale = en_USCreate the Entrypoint Script
Create docker-entrypoint.sh:
#!/bin/bashset -e
# Color codes for outputRED='\033[0;31m'GREEN='\033[0;32m'YELLOW='\033[1;33m'NC='\033[0m' # No Color
echo -e "${GREEN}Starting Galette container initialization...${NC}"
# Galette directoriesGALETTE_ROOT="/var/www/galette/galette"GALETTE_DATA="${GALETTE_ROOT}/data"GALETTE_CONFIG="${GALETTE_ROOT}/config"
# Ensure data directories exist with proper permissionsecho -e "${YELLOW}Setting up data directories...${NC}"directories=( "${GALETTE_DATA}/photos" "${GALETTE_DATA}/attachments" "${GALETTE_DATA}/exports" "${GALETTE_DATA}/imports" "${GALETTE_DATA}/tempimages" "${GALETTE_DATA}/logs" "${GALETTE_DATA}/cache" "${GALETTE_DATA}/files" "${GALETTE_ROOT}/templates_c")
for dir in "${directories[@]}"; do if [ ! -d "$dir" ]; then mkdir -p "$dir" echo -e " Created: $dir" fidone
# Set ownership and permissionschown -R www-data:www-data "${GALETTE_DATA}"chown -R www-data:www-data "${GALETTE_ROOT}/templates_c"chown -R www-data:www-data "${GALETTE_CONFIG}"chmod -R 775 "${GALETTE_DATA}"chmod -R 775 "${GALETTE_ROOT}/templates_c"chmod -R 775 "${GALETTE_CONFIG}"
# Generate config.inc.php if environment variables are setif [ -n "${GALETTE_DB_HOST}" ] && [ -n "${GALETTE_DB_NAME}" ]; then echo -e "${YELLOW}Generating Galette configuration from environment variables...${NC}"
CONFIG_FILE="${GALETTE_CONFIG}/config.inc.php"
# Determine database type DB_TYPE="${GALETTE_DB_TYPE:-mysql}"
cat > "${CONFIG_FILE}" << EOF<?php/** * Galette Configuration * Generated automatically from environment variables */
// Database configurationdefine('TYPE_DB', '${DB_TYPE}');define('HOST_DB', '${GALETTE_DB_HOST}');define('PORT_DB', '${GALETTE_DB_PORT:-3306}');define('USER_DB', '${GALETTE_DB_USER}');define('PWD_DB', '${GALETTE_DB_PASSWORD}');define('NAME_DB', '${GALETTE_DB_NAME}');define('PREFIX_DB', '${GALETTE_DB_PREFIX:-galette_}');
// Installation mode (set to false after initial setup)define('GALETTE_MODE', '${GALETTE_MODE:-PROD}');
// Debug modedefine('GALETTE_DEBUG', ${GALETTE_DEBUG:-false});EOF
chown www-data:www-data "${CONFIG_FILE}" chmod 640 "${CONFIG_FILE}" echo -e "${GREEN}Configuration file generated successfully.${NC}"fi
# Configure email settings if SMTP is configuredif [ -n "${SMTP_HOST}" ]; then echo -e "${YELLOW}Configuring SMTP settings...${NC}"
cat > /etc/msmtprc << EOFaccount defaulthost ${SMTP_HOST}port ${SMTP_PORT:-587}auth onuser ${SMTP_USER}password ${SMTP_PASSWORD}from ${SMTP_FROM:-noreply@example.com}tls ontls_starttls ontls_trust_file /etc/ssl/certs/ca-certificates.crtlogfile /var/log/msmtp.logEOF
chmod 600 /etc/msmtprc
# Configure PHP to use msmtp echo 'sendmail_path = "/usr/bin/msmtp -t"' >> /usr/local/etc/php/conf.d/mail.ini
echo -e "${GREEN}SMTP configuration completed.${NC}"fi
# Set timezone if providedif [ -n "${TZ}" ]; then echo -e "${YELLOW}Setting timezone to ${TZ}...${NC}" ln -snf "/usr/share/zoneinfo/${TZ}" /etc/localtime echo "${TZ}" > /etc/timezone echo "date.timezone = ${TZ}" >> /usr/local/etc/php/conf.d/galette.inifi
# Wait for database if configuredif [ -n "${GALETTE_DB_HOST}" ]; then echo -e "${YELLOW}Waiting for database connection...${NC}"
max_attempts=30 attempt=1
while [ $attempt -le $max_attempts ]; do if php -r " \$host = '${GALETTE_DB_HOST}'; \$port = ${GALETTE_DB_PORT:-3306}; \$user = '${GALETTE_DB_USER}'; \$pass = '${GALETTE_DB_PASSWORD}'; \$db = '${GALETTE_DB_NAME}'; \$type = '${GALETTE_DB_TYPE:-mysql}';
try { if (\$type === 'pgsql') { \$dsn = \"pgsql:host=\$host;port=\$port;dbname=\$db\"; } else { \$dsn = \"mysql:host=\$host;port=\$port;dbname=\$db\"; } new PDO(\$dsn, \$user, \$pass, [PDO::ATTR_TIMEOUT => 5]); exit(0); } catch (Exception \$e) { exit(1); } " 2>/dev/null; then echo -e "${GREEN}Database connection established.${NC}" break fi
echo -e " Attempt $attempt/$max_attempts: Waiting for database..." sleep 2 attempt=$((attempt + 1)) done
if [ $attempt -gt $max_attempts ]; then echo -e "${RED}Warning: Could not connect to database after $max_attempts attempts.${NC}" echo -e "${YELLOW}Galette will start anyway - please check your database configuration.${NC}" fifi
echo -e "${GREEN}Galette initialization complete. Starting Apache...${NC}"
# Execute the main commandexec "$@"Create the .dockerignore File
Create .dockerignore:
.git.github.gitignore.env.env.**.mddocker-compose*.yml.dockerignoreDockerfile**.log*.bak*.swp*.tmpnode_modules.DS_StoreThumbs.dbStep 2: Set Up the Database
Galette requires a MySQL, MariaDB, or PostgreSQL database. You can deploy a database on Klutch.sh or use an external database service.
Option A: Deploy MySQL on Klutch.sh
Follow our MySQL deployment guide to set up a MySQL database on Klutch.sh.
After deploying MySQL, create a database and user for Galette:
CREATE DATABASE galette CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;CREATE USER 'galette_user'@'%' IDENTIFIED BY 'your_secure_password';GRANT ALL PRIVILEGES ON galette.* TO 'galette_user'@'%';FLUSH PRIVILEGES;Option B: Deploy MariaDB on Klutch.sh
Alternatively, follow our MariaDB deployment guide for a MySQL-compatible database.
Database Connection Details
After deploying your database, note the following connection details:
- Host: Your database app URL (e.g.,
mysql-app.klutch.sh) - Port:
8000(external port for TCP connections on Klutch.sh) - Database Name:
galette - Username:
galette_user - Password: Your secure password
Step 3: Deploy to Klutch.sh
- Log in to your Klutch.sh dashboard.
- Click Create New App to start a new deployment.
-
Enter an app name (e.g.,
galetteormembership-portal). - Connect your GitHub account and select the repository containing your Galette Dockerfile.
- Klutch.sh will automatically detect the Dockerfile in your repository root.
-
Configure the following settings:
- Traffic Type: Select HTTP
- Internal Port: Enter
80
- Add environment variables (see the Environment Variables section below).
- Click Deploy to start the build and deployment process.
Step 4: Configure Environment Variables
In your Klutch.sh app settings, add the following environment variables:
Required Database Variables
| Variable | Description | Example |
|---|---|---|
GALETTE_DB_TYPE | Database type (mysql or pgsql) | mysql |
GALETTE_DB_HOST | Database server hostname | mysql-app.klutch.sh |
GALETTE_DB_PORT | Database port | 8000 |
GALETTE_DB_NAME | Database name | galette |
GALETTE_DB_USER | Database username | galette_user |
GALETTE_DB_PASSWORD | Database password | your_secure_password |
GALETTE_DB_PREFIX | Table prefix | galette_ |
Application Variables
| Variable | Description | Example |
|---|---|---|
GALETTE_MODE | Application mode (PROD, DEV, or MAINT) | PROD |
GALETTE_DEBUG | Enable debug mode | false |
TZ | Timezone | America/New_York |
Optional SMTP Variables
| Variable | Description | Example |
|---|---|---|
SMTP_HOST | SMTP server hostname | smtp.sendgrid.net |
SMTP_PORT | SMTP server port | 587 |
SMTP_USER | SMTP username | apikey |
SMTP_PASSWORD | SMTP password | your_smtp_password |
SMTP_FROM | Default sender email | noreply@yourorg.org |
Step 5: Attach Persistent Storage
Galette stores member photos, attachments, exports, and other files that need to persist across deployments.
- In your Klutch.sh app settings, navigate to the Volumes section.
-
Click Add Volume and configure:
- Mount Path:
/var/www/galette/galette/data - Size: Start with
5GB(increase as needed for your organization)
- Mount Path:
- Save the configuration and redeploy your app.
The persistent volume ensures that:
- Member photos are preserved
- Uploaded attachments persist
- Export files remain available
- Import history is maintained
- Logs are retained across restarts
For more information on persistent storage, see our Persistent Volumes documentation.
Step 6: Complete Initial Setup
After deployment, complete the Galette installation through the web interface:
-
Navigate to your Galette instance at
https://your-app.klutch.sh. -
The installation wizard will guide you through the setup process:
- System Check: Verify PHP requirements and permissions
- Database Configuration: If not configured via environment variables, enter your database details
- Database Installation: Choose between new installation or import existing data
- Administrator Account: Create the super administrator account
- After completing setup, log in with your administrator credentials.
-
Important: After installation, update
GALETTE_MODEtoPRODand redeploy to disable the installation wizard.
Getting Started with Galette
Creating Your First Member
Once logged in as administrator:
- Navigate to Members → Add a member.
-
Fill in the member details:
- Personal information (name, birthdate, gender)
- Contact information (email, phone, address)
- Membership status and category
- Optional: Upload a member photo
- Click Save to create the member record.
Setting Up Member Categories
Customize membership types for your organization:
- Go to Configuration → Membership status.
-
Add statuses like:
- Active Member
- Honorary Member
- Board Member
- Student Member
- Expired
- Navigate to Configuration → Contributions types.
-
Define contribution types:
- Annual Dues
- Donation
- Event Registration
- Merchandise
Recording Contributions
Track membership dues and donations:
- Go to Contributions → Add a contribution.
- Select the member, contribution type, and amount.
- Set the contribution dates and payment method.
- Save to record the contribution.
Bulk Import Members
Import existing member data from CSV:
- Prepare a CSV file with member data matching Galette's import format.
- Navigate to Members → Import from CSV.
- Upload your CSV file and map columns to Galette fields.
- Review the import preview and confirm.
Example CSV format:
nom_adh,prenom_adh,pseudo_adh,email_adh,date_crea_adhSmith,John,jsmith,john.smith@example.com,2024-01-15Johnson,Sarah,sjohnson,sarah.j@example.com,2024-01-20Williams,Michael,mwilliams,m.williams@example.com,2024-02-01API Integration
Galette provides a REST API for programmatic access to member data.
Enabling the API
- Log in as administrator.
- Navigate to Configuration → Plugins.
- Install and enable the API plugin if not already active.
- Generate an API key in the plugin settings.
Example: Fetching Members (PHP)
<?php/** * Galette API Example - Fetch Members */
$apiUrl = 'https://your-app.klutch.sh/api';$apiKey = 'your_api_key';
// Initialize cURL$ch = curl_init();
// Configure requestcurl_setopt_array($ch, [ CURLOPT_URL => "$apiUrl/members", CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer $apiKey", "Content-Type: application/json", "Accept: application/json" ]]);
// Execute request$response = curl_exec($ch);$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);curl_close($ch);
if ($httpCode === 200) { $members = json_decode($response, true);
foreach ($members as $member) { echo "Member: {$member['firstname']} {$member['lastname']}\n"; echo " Email: {$member['email']}\n"; echo " Status: {$member['status']}\n"; echo "---\n"; }} else { echo "Error: HTTP $httpCode\n"; echo $response;}Example: Create Member (Python)
"""Galette API Example - Create Member"""import requestsimport json
API_URL = "https://your-app.klutch.sh/api"API_KEY = "your_api_key"
headers = { "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json", "Accept": "application/json"}
# New member datanew_member = { "nom_adh": "Garcia", "prenom_adh": "Maria", "pseudo_adh": "mgarcia", "email_adh": "maria.garcia@example.com", "login_adh": "mgarcia", "mdp_adh": "secure_password_123", "id_statut": 1, # Active member status "date_crea_adh": "2024-03-15"}
try: response = requests.post( f"{API_URL}/members", headers=headers, json=new_member )
if response.status_code == 201: member = response.json() print(f"Created member: {member['firstname']} {member['lastname']}") print(f"Member ID: {member['id']}") else: print(f"Error {response.status_code}: {response.text}")
except requests.exceptions.RequestException as e: print(f"Request failed: {e}")Example: Export Members (Node.js)
/** * Galette API Example - Export Members */const https = require('https');
const API_URL = 'your-app.klutch.sh';const API_KEY = 'your_api_key';
const options = { hostname: API_URL, path: '/api/members/export', method: 'GET', headers: { 'Authorization': `Bearer ${API_KEY}`, 'Accept': 'text/csv' }};
const req = https.request(options, (res) => { let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { if (res.statusCode === 200) { // Save CSV data const fs = require('fs'); fs.writeFileSync('members_export.csv', data); console.log('Members exported successfully'); } else { console.error(`Error ${res.statusCode}: ${data}`); } });});
req.on('error', (e) => { console.error(`Request failed: ${e.message}`);});
req.end();Installing Plugins
Galette supports plugins to extend its functionality.
Official Plugins
- Maps: Display members on an interactive map
- Events: Manage events and registrations
- Auto: Automatic membership renewal and billing
- Paypal: Accept online payments via PayPal
- Activities: Track member activities and participation
- FullCard: Enhanced membership card generation
Installing a Plugin
- Download the plugin from the Galette website.
-
Update your Dockerfile to include the plugin:
# Add to your Dockerfile after Galette installation# Download and install pluginsRUN cd /var/www/galette/galette/plugins \&& wget -q "https://github.com/galette/plugin-maps/releases/download/v1.5.0/plugin-maps-1.5.0.tar.bz2" \&& tar -xjf plugin-maps-*.tar.bz2 \&& rm plugin-maps-*.tar.bz2 \&& chown -R www-data:www-data /var/www/galette/galette/plugins
- Commit and push changes to trigger a new deployment.
- Activate the plugin in Configuration → Plugins.
Configuring Email Templates
Galette uses customizable email templates for member communications.
Accessing Templates
- Navigate to Configuration → Emails content.
-
Select a template to customize:
- New account notification
- Password reset
- Contribution reminder
- Membership expiration warning
- Custom mailings
Template Variables
Use these variables in your templates:
| Variable | Description |
|---|---|
{NAME} | Member’s full name |
{FIRSTNAME} | Member’s first name |
{LASTNAME} | Member’s last name |
{LOGIN} | Member’s username |
{COMPANY} | Member’s company name |
{DEADLINE} | Membership expiration date |
{CONTRIB_BEGIN} | Contribution start date |
{CONTRIB_END} | Contribution end date |
{AMOUNT} | Contribution amount |
{COMMENT} | Contribution comment |
Example: Custom Renewal Reminder
Subject: Membership Renewal Reminder - {COMPANY}
Dear {FIRSTNAME},
This is a friendly reminder that your membership with our organizationexpires on {DEADLINE}.
To continue enjoying member benefits, please renew your membership atyour earliest convenience.
If you have already renewed, please disregard this message.
Best regards,The Membership TeamProduction Best Practices
Security Hardening
-
Remove Install Directory: After installation, add this to your Dockerfile:
RUN rm -rf /var/www/galette/galette/install
- Restrict Config Access: Ensure config files are not web-accessible (handled in Apache config).
- Use Strong Passwords: Generate unique passwords for database and admin accounts.
- Enable HTTPS: Klutch.sh provides automatic HTTPS—ensure all communications use it.
- Regular Updates: Keep Galette updated by changing the version in your Dockerfile.
Backup Strategy
Implement regular backups for your membership data:
Database Backup:
# Connect to your MySQL container and create backupmysqldump -h mysql-app.klutch.sh -P 8000 -u galette_user -p galette > galette_backup_$(date +%Y%m%d).sqlFile Backup:
The persistent volume at /var/www/galette/galette/data should be backed up regularly. Consider:
- Export member data periodically via Galette’s export feature
- Download generated exports and reports
- Archive member photos and attachments
Performance Optimization
- Enable OPcache: Already configured in php-galette.ini for optimal PHP performance.
- Database Indexing: Galette creates necessary indexes during installation.
- Image Optimization: Use appropriately sized member photos (recommended: 150x200 pixels).
- Caching: Apache caching headers configured for static assets.
Monitoring
Monitor your Galette deployment through:
- Klutch.sh dashboard logs for application errors
- Database query performance via MySQL/MariaDB tools
- PHP error logs in
/var/log/php_errors.log - Apache access and error logs
For detailed monitoring setup, see our Monitoring documentation.
Troubleshooting
Common Issues and Solutions
Issue: Installation wizard appears after setup
The installation wizard is still accessible. Update the environment variable:
GALETTE_MODE=PRODThen redeploy your application.
Issue: Cannot connect to database
Verify your database connection settings:
- Check that the database host is correct (include port 8000 for Klutch.sh databases)
- Verify credentials are correct
- Ensure the database exists and user has proper permissions
- Check if the database container is running
Issue: File upload fails
Check PHP upload limits and file permissions:
- Verify
upload_max_filesizeandpost_max_sizein php-galette.ini - Ensure the data directory has write permissions
- Check available disk space on the persistent volume
Issue: Emails not sending
Troubleshoot SMTP configuration:
- Verify SMTP credentials are correct
- Check SMTP port (usually 587 for TLS, 465 for SSL)
- Review msmtp logs:
cat /var/log/msmtp.log - Test SMTP connection independently
Issue: Photos not displaying
Verify the photos directory permissions:
# In containerls -la /var/www/galette/galette/data/photoschown -R www-data:www-data /var/www/galette/galette/data/photosIssue: Slow performance with many members
Optimize for large datasets:
- Increase PHP memory limit in php-galette.ini
- Enable MySQL query caching
- Add database indexes for frequently queried fields
- Consider upgrading container resources in Klutch.sh
Issue: Template compilation errors
Clear the templates cache:
# In containerrm -rf /var/www/galette/galette/templates_c/*chown -R www-data:www-data /var/www/galette/galette/templates_cUpgrading Galette
To upgrade to a new version of Galette:
- Backup Everything: Export your database and download the data directory.
-
Update Dockerfile: Change the
GALETTE_VERSIONvariable:ENV GALETTE_VERSION=1.2.0 - Review Release Notes: Check the Galette news for migration requirements.
- Commit and Deploy: Push changes to trigger a new deployment.
- Run Migrations: Galette will automatically detect and apply database updates on first access.
- Verify Functionality: Test member management, contributions, and other features.
Additional Resources
- Galette Official Website
- Galette Documentation
- Galette GitHub Repository
- Galette Plugins
- Klutch.sh MySQL Guide
- Klutch.sh MariaDB Guide
- Klutch.sh Persistent Volumes
- Klutch.sh Custom Domains
Summary
Galette is an excellent choice for non-profit organizations, clubs, and associations looking for a comprehensive membership management solution. By deploying Galette on Klutch.sh, you get:
- Easy Deployment: Automatic Dockerfile detection and building
- Reliable Storage: Persistent volumes for member data and photos
- Flexible Database: Support for MySQL, MariaDB, or PostgreSQL
- Secure Hosting: Production-grade infrastructure with HTTPS
- Scalable Resources: Adjust as your organization grows
With the configuration outlined in this guide, your Galette instance is ready to manage members, track contributions, send mailings, and generate reports—all the tools your organization needs to thrive.