raulcnadal/intelligence-booking

By raulcnadal

Updated 3 months ago

Fork of Easy!Appointments Open Source Online Booking Tool

Image
0

7.4K

raulcnadal/intelligence-booking repository overview

Intelligence Booking — Quick Deployment Guide

Prerequisites

  • Docker Engine 24+ with Buildx
  • Docker Hub account with push access to raulcnadal/intelligence-booking
  • Nginx Proxy Manager (NPM) running in an external Docker network
  • A MySQL 8.0 host (deployed as a companion container in this guide)

1. Repository Structure

Intelligence Booking/
├── docker/
│   ├── Dockerfile
│   └── entrypoint.sh
├── application/          # CodeIgniter 3 application
├── assets/               # Frontend JS, CSS, images
└── ...

2. Build & Push

Build for both ARM64 and AMD64 (for M-series Mac + Linux server):

cd "Intelligence Booking"

docker buildx build \
  --platform linux/arm64,linux/amd64 \
  --file docker/Dockerfile \
  -t raulcnadal/intelligence-booking:latest \
  --push .

Important: Always replace .min.js files alongside their .js sources before building. The asset_url() helper serves .min.js in production. There is no automated minification step — .min.js files are committed directly as copies of their .js source.


3. Docker Compose

services:
  intelligence-booking:
    image: raulcnadal/intelligence-booking:latest
    expose:
      - 80
    networks:
      - booking_internal
      - npm_network
    environment:
      EA_BASE_URL: "${EA_BASE_URL}"
      EA_DB_HOST: db
      EA_DB_NAME: "${EA_DB_NAME}"
      EA_DB_USERNAME: "${EA_DB_USERNAME}"
      EA_DB_PASSWORD: "${EA_DB_PASSWORD}"
      EA_LANGUAGE: "${EA_LANGUAGE}"
      EA_DEBUG_MODE: "0"
      OIDC_ONLY_MODE: "true"
      MAIL_PROTOCOL: mail
      MAIL_SMTP_DEBUG: 0
      MAIL_SMTP_AUTH: 0
      MAIL_SMTP_HOST: smtp-relay.brevo.com
      MAIL_SMTP_USER: "${MAIL_SMTP_USER}"
      MAIL_SMTP_PASS: "${MAIL_SMTP_PASS}"
      MAIL_SMTP_CRYPTO: tls
      MAIL_SMTP_PORT: 587
      MAIL_FROM_ADDRESS: "${MAIL_FROM_ADDRESS}"
      MAIL_FROM_NAME: "Intelligence Booking"
      MAIL_REPLY_TO_ADDRESS: "${MAIL_REPLY_TO_ADDRESS}"
    volumes:
      - /opt/docker/intelligence-booking/storage:/var/www/html/storage
    depends_on:
      - db
    restart: unless-stopped

  db:
    image: mysql:8.0
    environment:
      MYSQL_DATABASE: "${EA_DB_NAME}"
      MYSQL_USER: "${EA_DB_USERNAME}"
      MYSQL_PASSWORD: "${EA_DB_PASSWORD}"
      MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
    volumes:
      - /opt/docker/intelligence-booking/db:/var/lib/mysql
    networks:
      - booking_internal
    command:
      - --default-authentication-plugin=mysql_native_password
      - --lower_case_table_names=1
      - --sql-mode=NO_ENGINE_SUBSTITUTION
    expose:
      - 3306
    restart: unless-stopped

networks:
  booking_internal:
    driver: bridge
  npm_network:
    external: true
    name: npm-rp1-nodb-stack_default

4. Environment Variables

Create a .env file alongside your compose file:

EA_BASE_URL=https://booking.yourdomain.com
EA_DB_NAME=easyappointments
EA_DB_USERNAME=ea_user
EA_DB_PASSWORD=your_db_password
DB_ROOT_PASSWORD=your_root_password
EA_DEBUG_MODE=0
EA_LANGUAGE=english

[email protected]
MAIL_SMTP_PASS=your_smtp_password
[email protected]
[email protected]
VariableDescription
EA_BASE_URLFull public URL including https://
EA_DEBUG_MODESet to 0 in production, 1 for verbose PHP errors
OIDC_ONLY_MODEtrue = hides username/password login, SSO button only
MAIL_SMTP_HOSTSMTP relay hostname
MAIL_SMTP_PASSSMTP password or API key

5. Host Directories

Create bind-mount directories on the host before first deploy:

mkdir -p /opt/docker/intelligence-booking/{storage,db}
chmod 777 /opt/docker/intelligence-booking/storage

6. First Deploy

docker compose --env-file .env up -d

The entrypoint automatically:

  1. Waits for MySQL to be ready
  2. Runs all pending migrations (up to version 74)
  3. Seeds default admin credentials on a fresh database
  4. Starts Apache

Default credentials after fresh install:

  • Username: administrator
  • Password: administrator

Change these immediately after first login via Users → Admins.


7. Nginx Proxy Manager

Add a Proxy Host in NPM:

FieldValue
Domainbooking.yourdomain.com
Schemehttp
Forward Hostnameintelligence-booking (container name)
Forward Port80
WebsocketsOff
SSLLet's Encrypt, Force SSL, HTTP/2

8. Upgrade

# 1. Build and push new image
docker buildx build --platform linux/arm64,linux/amd64 \
  --file docker/Dockerfile \
  -t raulcnadal/intelligence-booking:latest --push .

# 2. Pull and recreate container
docker compose --env-file .env pull
docker compose --env-file .env up -d

Migrations run automatically on container start — the database is upgraded in place, no manual SQL needed.


9. OIDC / SSO Configuration

OIDC is configured through the admin UI at Settings → Integrations → OIDC. The compose environment variables for OIDC are intentionally commented out — configure through the UI instead.

OIDC_ONLY_MODE=true hides the username/password form but leaves the SSO button visible. Set to false or remove to show both.


10. Reset Database

Only do this on a fresh deployment or if you explicitly want to wipe all data:

docker compose down
rm -rf /opt/docker/intelligence-booking/db/*
rm -rf /opt/docker/intelligence-booking/storage/*
docker compose --env-file .env up -d

Tag summary

Content type

Image

Digest

sha256:e620117de

Size

327.8 MB

Last updated

3 months ago

docker pull raulcnadal/intelligence-booking