Part 1: Understanding EasyAppointments
What is EasyAppointments?
EasyAppointments is a powerful open-source appointment scheduling application that simplifies the process of managing bookings. It’s designed to be highly customizable and can be adapted to various business needs, from small service providers to larger enterprises.
Key Features of EasyAppointments
- Multilingual support: Translated user interface for global accessibility
- Customer and appointment management: Easily track and manage all your appointments in one place
- Service and provider organization: Set up different services with associated providers
- Working plan and booking rules: Define when services are available
- Google Calendar synchronization: Keep your appointments in sync with Google Calendar
- Email notification system: Automated emails for bookings, cancellations, and reminders
- Self-hosted installation: Complete control over your data and privacy
Part 2: Setting Up EasyAppointments with Docker
Prerequisites
- A server with Docker installed
- Basic knowledge of Docker concepts
- Administrative access to your server
Installation Process
Preparing the Docker Environment
Begin by pulling the official EasyAppointments Docker image to your server. This image contains all the necessary components for running the application. Execute the following command in your terminal to download the latest version:
1 2 3 |
docker pull alextselegidis/easyappointments |
Setting Up the Database
EasyAppointments requires a MySQL database to store appointment data, customer information, and configuration settings. Create a dedicated database container with the following command:
1 2 3 4 5 6 |
docker run -d --name easyappointments-db \ -e MYSQL_ROOT_PASSWORD=your_secure_password \ -e MYSQL_DATABASE=easyappointments \ mysql:latest |
This command creates a container named “easyappointments-db” running MySQL with a database specifically for EasyAppointments. Make sure to replace “your_secure_password” with a strong password of your choice.
Deploying the Application
With the database in place, you can now deploy the EasyAppointments application container. The following command links the application to the database and exposes it on port 80:
1 2 3 4 5 6 7 8 9 10 |
docker run --name easyappointments-app -d \ --link easyappointments-db:db \ -p 80:80 \ -e DB_HOST=db \ -e DB_NAME=easyappointments \ -e DB_USERNAME=root \ -e DB_PASSWORD=your_secure_password \ alextselegidis/easyappointments |
This configuration establishes the connection between EasyAppointments and the MySQL database created earlier. The application will be accessible on port 80 of your server.
Completing the Setup
After successfully deploying the containers, open your web browser and navigate to your server’s IP address (http://your_server_ip). You’ll be presented with the EasyAppointments setup wizard. This user-friendly interface will guide you through the initial configuration process, including creating an administrator account and setting up your business details.
Simplified Deployment with Docker Compose
Creating a Configuration File
Docker Compose offers a more elegant approach to managing multi-container applications like EasyAppointments. Begin by creating a configuration file named docker-compose.yml
in your project directory. This file will define both the database and application containers along with their respective settings:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
version: '3.1' services: easyappointments: image: 'alextselegidis/easyappointments:latest' restart: always ports: - '80:80' environment: - BASE_URL=http://your_server_ip - DEBUG_MODE=FALSE - DB_HOST=mysql - DB_NAME=easyappointments - DB_USERNAME=root - DB_PASSWORD=your_secure_password volumes: - easyappointments:/var/www/html mysql: image: 'mysql:8.0' restart: always environment: - MYSQL_ROOT_PASSWORD=your_secure_password - MYSQL_DATABASE=easyappointments volumes: - mysql:/var/lib/mysql volumes: easyappointments: mysql: |
This configuration specifies two services: the EasyAppointments application and a MySQL database. It also sets up persistent volumes for both containers to ensure data is preserved even if the containers are restarted or updated.
Launching the Application Stack
With the configuration file in place, you can deploy the entire application stack with a single command:
1 2 3 |
docker-compose up -d |
The Docker Compose tool will read your configuration file, download the necessary images if they’re not already available, and create the containers according to your specifications. The -d
flag runs the containers in detached mode, allowing them to operate in the background.
Email Configuration
For email notifications, add these environment variables to your Docker configuration:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
environment: # ... other variables ... - SMTP_HOST=smtp.example.org - SMTP_PORT=587 - SMTP_AUTH=1 - SMTP_USERNAME=your_username - SMTP_PASSWORD=your_password - SMTP_FROM_ADDRESS=info@example.org - SMTP_FROM_NAME=Your Business - SMTP_REPLY_TO_ADDRESS=info@example.org - SMTP_PROTOCOL=tls - SMTP_TLS=YES |
Thoughts
By combining EasyAppointments and Portainer, you’ve set up a powerful, self-hosted solution for appointment scheduling and container management. This approach gives you complete control over your data while providing robust functionality.
The Docker-based deployment makes maintenance, updates, and backups straightforward, allowing you to focus on your business rather than complex IT management. As your needs grow, both tools can scale with you, offering additional features and capabilities.
For more information, visit the official documentation:
Happy scheduling and container managing!