Deploying Shifter
Introduction
Shifter is a self-hosted shift scheduling and workforce management solution designed for businesses that need to manage employee schedules efficiently. It provides tools for creating shifts, managing employee availability, handling shift swaps, and coordinating team schedules through an intuitive web interface.
Whether you run a retail store, restaurant, healthcare facility, or any operation with rotating schedules, Shifter helps streamline the scheduling process while giving employees visibility into their upcoming shifts and the ability to manage their availability.
Key highlights of Shifter:
- Shift Management: Create, edit, and assign shifts to employees
- Employee Availability: Track when employees can work
- Schedule Views: Daily, weekly, and monthly schedule views
- Shift Requests: Allow employees to request shifts or time off
- Swap Management: Handle shift swap requests between employees
- Notifications: Alert employees about schedule changes
- Multi-Location: Support for multiple locations or departments
- Role Management: Different access levels for managers and employees
- Time Tracking: Basic time and attendance features
- Export Options: Export schedules for payroll or printing
This guide walks through deploying a shift scheduling solution on Klutch.sh using Docker.
Why Deploy Shifter on Klutch.sh
Deploying a shift scheduling application on Klutch.sh provides several advantages:
Simplified Deployment: Klutch.sh handles container orchestration without complex setup.
Persistent Storage: Attach persistent volumes for schedule data and employee information.
HTTPS by Default: Klutch.sh provides automatic SSL certificates for secure access.
Mobile Access: Employees can check schedules from anywhere on any device.
Custom Domains: Use your company domain for a professional scheduling portal.
Prerequisites
Before deploying on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your configuration
- Basic familiarity with Docker and containerization concepts
- A database (PostgreSQL or MySQL depending on the application)
Preparing Your Repository
Create a GitHub repository with your configuration.
Repository Structure
shifter-deploy/├── Dockerfile└── .dockerignoreCreating the Dockerfile
Create a Dockerfile in the root of your repository. This example shows a generic setup that can be adapted for various scheduling applications:
FROM node:18-alpine
WORKDIR /app
# Environment variablesENV NODE_ENV=productionENV DATABASE_URL=${DATABASE_URL}ENV SECRET_KEY=${SECRET_KEY}ENV APP_URL=${APP_URL}
# Install dependenciesCOPY package*.json ./RUN npm ci --only=production
# Copy applicationCOPY . .
# Build if neededRUN npm run build
# Expose the web interface portEXPOSE 3000
CMD ["npm", "start"]Environment Variables Reference
| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE_URL | Yes | - | Database connection string |
SECRET_KEY | Yes | - | Application secret for sessions |
APP_URL | Yes | - | Public URL of the application |
SMTP_HOST | No | - | SMTP server for notifications |
SMTP_PORT | No | 587 | SMTP port |
SMTP_USER | No | - | SMTP username |
SMTP_PASSWORD | No | - | SMTP password |
TZ | No | UTC | Timezone for schedule display |
Deploying on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 3000 (or your application’s port)
Set Up Database
A shift scheduling application requires a database. Deploy a PostgreSQL or MySQL instance, or use a managed database service.
Generate Secret Key
Generate a secure secret key:
openssl rand -hex 32Push Your Repository to GitHub
Initialize and push your repository:
git initgit add Dockerfile .dockerignoregit commit -m "Initial deployment configuration"git remote add origin https://github.com/yourusername/shifter-deploy.gitgit push -u origin mainCreate a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project with a descriptive name like “shifter” or “scheduling”.
Create a New App
Within your project, create a new app. Connect your GitHub account and select your repository.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Add the following environment variables:
| Variable | Value |
|---|---|
DATABASE_URL | Your database connection string |
SECRET_KEY | Your generated secret key |
APP_URL | https://your-app-name.klutch.sh |
TZ | Your business timezone |
Attach Persistent Volumes
Add volumes as needed:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/app/data | 5 GB | Application data and uploads |
Deploy Your Application
Click Deploy to start the build process.
Access the Application
Once deployment completes, access your scheduling application at https://your-app-name.klutch.sh.
Core Features Setup
Creating Departments/Locations
- Log in as administrator
- Navigate to Settings > Departments
- Add departments or locations
- Configure settings for each
Adding Employees
- Go to Employees section
- Click Add Employee
- Enter employee details:
- Name and contact information
- Department assignment
- Role and permissions
- Send invitation for account setup
Setting Up Shift Templates
- Navigate to Shift Templates
- Create templates for common shifts:
- Morning shift (6 AM - 2 PM)
- Evening shift (2 PM - 10 PM)
- Night shift (10 PM - 6 AM)
- Assign colors for visual identification
Schedule Management
Creating Schedules
- Go to Schedule view
- Select the week to schedule
- Click on empty slots to add shifts
- Assign employees to shifts
- Publish the schedule
Managing Availability
Employees can set their availability:
- Go to My Availability
- Mark available and unavailable times
- Submit for manager approval
Handling Shift Swaps
- Employee requests a swap in the system
- Another employee accepts the swap
- Manager approves the exchange
- Schedule updates automatically
Notifications
Email Notifications
Configure SMTP for email notifications:
- Schedule published
- Shift assignments
- Swap requests
- Time-off approvals
Configuring Reminders
Set up shift reminders:
- Go to Settings > Notifications
- Enable reminder emails
- Set reminder timing (24 hours before, etc.)
Troubleshooting
Schedule Not Displaying
Symptoms: Calendar view is blank or broken.
Solutions:
- Verify timezone configuration
- Check database connectivity
- Clear browser cache
- Review JavaScript console for errors
Notifications Not Sending
Symptoms: Employees don’t receive email notifications.
Solutions:
- Verify SMTP configuration
- Check email addresses are valid
- Review email logs
- Test SMTP connection
Permission Issues
Symptoms: Employees can’t access features they should have.
Solutions:
- Review role assignments
- Check permission settings
- Clear session and re-login
- Verify department assignments
Additional Resources
For self-hosted scheduling solutions, consider these open-source alternatives:
Conclusion
Deploying a shift scheduling application on Klutch.sh gives your business a centralized, accessible platform for managing employee schedules. With features for availability tracking, shift swaps, and notifications, you can streamline scheduling while keeping everyone informed about their work hours.