🌐 VI | EN

Run Easy!Appointments in Docker

Nghia Phan
Nghia Phan
🌐 Bản tiếng Việt → Technical Guide Views
Advertisement
Sponsored

Easy!Appointments is an open-source web application for customer bookings and can synchronize with Google Calendar. This guide uses a private Docker network and stores the database under ~/docker/mariadb.

Install Docker

Log into Linux with a sudo-capable account and run the commands below. The source uses apt-key; on a current distribution, also check the official Docker installation documentation because this command is deprecated.

sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -ycurl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable"sudo apt install docker-ce docker-compose containerd.io -ysudo systemctl enable docker && sudo systemctl start dockersudo usermod -aG docker $USERsu - $USER

Create the database and application containers

  1. Create the directory and give the current user ownership:
mkdir ~/docker/mariadb -psudo chown "$USER":"$USER" ~/docker -R
  1. Create the shared network:
docker network create containers
  1. Start MariaDB. Replace both [DB_PASSWORD] values with private passwords; do not use the source tutorial’s example passwords:
docker run -d --name mariadb \  --network containers --network-alias db \  -e MYSQL_ROOT_PASSWORD='[DB_ROOT_PASSWORD]' \  -e MYSQL_USER=easy_appointments_rw \  -e MYSQL_PASSWORD='[DB_PASSWORD]' \  -e MYSQL_DATABASE=easy_appointments \  -v /home/$USER/docker/mariadb:/var/lib/mysql \  --restart=unless-stopped mariadb:latest
  1. Start Easy!Appointments and point it to MariaDB:
docker run -d --name easy-appointments \  --network containers -p 8089:80 \  -e DB_HOST=mariadb \  -e DB_NAME=easy_appointments \  -e DB_USERNAME=easy_appointments_rw \  -e DB_PASSWORD='[DB_PASSWORD]' \  --restart=unless-stopped \  alextselegidis/easyappointments

Finish in the web installer

  1. Open http://DNSorIP:8089.
  2. Wait for the Easy!Appointments installer.
  3. Complete the Administrator and Company fields, then click Install Easy!Appointments.
  4. After reaching the application, check the containers with docker ps; inspect the log if the page does not load.
docker psdocker logs --tail=50 easy-appointments

Back up ~/docker/mariadb before upgrading the image. Do not expose the database port to the Internet.

Quảng cáo

Sources and video

Sponsored Advertisement
Partnership

Comments & Discussion

Share your thoughts, ask questions and feedback

Markdown & QQ Emoji
Loading comments...