Skip to content

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
└── .dockerignore

Creating 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 variables
ENV NODE_ENV=production
ENV DATABASE_URL=${DATABASE_URL}
ENV SECRET_KEY=${SECRET_KEY}
ENV APP_URL=${APP_URL}
# Install dependencies
COPY package*.json ./
RUN npm ci --only=production
# Copy application
COPY . .
# Build if needed
RUN npm run build
# Expose the web interface port
EXPOSE 3000
CMD ["npm", "start"]

Environment Variables Reference

VariableRequiredDefaultDescription
DATABASE_URLYes-Database connection string
SECRET_KEYYes-Application secret for sessions
APP_URLYes-Public URL of the application
SMTP_HOSTNo-SMTP server for notifications
SMTP_PORTNo587SMTP port
SMTP_USERNo-SMTP username
SMTP_PASSWORDNo-SMTP password
TZNoUTCTimezone for schedule display

Deploying on Klutch.sh

    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:

    Terminal window
    openssl rand -hex 32

    Push Your Repository to GitHub

    Initialize and push your repository:

    Terminal window
    git init
    git add Dockerfile .dockerignore
    git commit -m "Initial deployment configuration"
    git remote add origin https://github.com/yourusername/shifter-deploy.git
    git push -u origin main

    Create 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:

    • Select HTTP as the traffic type
    • Set the internal port to 3000 (or your application’s port)

    Set Environment Variables

    Add the following environment variables:

    VariableValue
    DATABASE_URLYour database connection string
    SECRET_KEYYour generated secret key
    APP_URLhttps://your-app-name.klutch.sh
    TZYour business timezone

    Attach Persistent Volumes

    Add volumes as needed:

    Mount PathRecommended SizePurpose
    /app/data5 GBApplication 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

  1. Log in as administrator
  2. Navigate to Settings > Departments
  3. Add departments or locations
  4. Configure settings for each

Adding Employees

  1. Go to Employees section
  2. Click Add Employee
  3. Enter employee details:
    • Name and contact information
    • Department assignment
    • Role and permissions
  4. Send invitation for account setup

Setting Up Shift Templates

  1. Navigate to Shift Templates
  2. Create templates for common shifts:
    • Morning shift (6 AM - 2 PM)
    • Evening shift (2 PM - 10 PM)
    • Night shift (10 PM - 6 AM)
  3. Assign colors for visual identification

Schedule Management

Creating Schedules

  1. Go to Schedule view
  2. Select the week to schedule
  3. Click on empty slots to add shifts
  4. Assign employees to shifts
  5. Publish the schedule

Managing Availability

Employees can set their availability:

  1. Go to My Availability
  2. Mark available and unavailable times
  3. Submit for manager approval

Handling Shift Swaps

  1. Employee requests a swap in the system
  2. Another employee accepts the swap
  3. Manager approves the exchange
  4. 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:

  1. Go to Settings > Notifications
  2. Enable reminder emails
  3. 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.