From 836139091f4d10bf4d9936d32723fe54fbcd7fcc Mon Sep 17 00:00:00 2001 From: Anuj Mishra <113639224+Anuj-Mishra8853@users.noreply.github.com> Date: Fri, 18 Oct 2024 14:21:44 +0530 Subject: [PATCH 1/7] QloApps version 1.6.1 --- Dockerfile | 18 +++++++++++------- README.md | 12 ++++++------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9980ed1..1dcba9d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 LABEL maintainer="Qloapps Support " ARG user=qloapps ##Php file configuration with php version and mysql version -ENV mysql_version=5.7 php_version=7.2 file_uploads=On allow_url_fopen=On memory_limit=512M max_execution_time=240 upload_max_filesize=200M post_max_size=400M max_input_vars=1500 +ENV php_version=7.4 file_uploads=On allow_url_fopen=On memory_limit=512M max_execution_time=500 upload_max_filesize=200M post_max_size=400M max_input_vars=1500 ##Update server and install lamp server RUN apt-get update \ && export DEBIAN_FRONTEND=noninteractive \ @@ -13,17 +13,17 @@ RUN apt-get update \ && apt-get install -y software-properties-common \ && apt-get install -y language-pack-en-base \ && LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php \ - && apt-get update \ + &&apt-get update \ && apt-get install -y php$php_version libapache2-mod-php$php_version php$php_version-bcmath php$php_version-cli php$php_version-json php$php_version-curl php$php_version-fpm php$php_version-gd php$php_version-ldap php$php_version-mbstring php$php_version-mysql php$php_version-soap php$php_version-sqlite3 php$php_version-xml php$php_version-zip php$php_version-intl php-imagick \ && echo "date.timezone = Asia/Kolkata" >> /etc/php/$php_version/apache2/php.ini \ && sed -i -e 's/memory_limit = .*/memory_limit = '${memory_limit}'/' -e 's/file_uploads = .*/file_uploads = '${file_uploads}'/' -e 's/allow_url_fopen = .*/allow_url_fopen = '${allow_url_fopen}'/' -e 's/max_execution_time = .*/max_execution_time = '${max_execution_time}'/' -e 's/upload_max_filesize = .*/upload_max_filesize = '${upload_max_filesize}'/' -e 's/post_max_size = .*/post_max_size = '${post_max_size}'/' -e 's/max_input_vars = .*/max_input_vars = '${max_input_vars}'/' /etc/php/$php_version/apache2/php.ini \ - && apt-get -y install mysql-server-$mysql_version \ + # && apt-get -y install mysql-server \ && apt-get install -y git nano vim curl openssh-server \ ##setup non root user && useradd -m -s /bin/bash ${user} \ && mkdir -p /home/${user}/www \ ##Download Qloapps latest version - && cd /home/${user}/www && git clone https://github.com/webkul/hotelcommerce \ + && cd /home/${user}/www && git clone https://github.com/Qloapps/QloApps.git \ ##change file permission and ownership && find /home/${user}/www -type f -exec chmod 644 {} \; \ && find /home/${user}/www -type d -exec chmod 755 {} \; \ @@ -34,13 +34,17 @@ RUN apt-get update \ Require all granted \n\ AllowOverride all \n\ ' >> /etc/apache2/apache2.conf \ - && sed -i "s@/var/www/html@/home/${user}/www/hotelcommerce@g" /etc/apache2/sites-enabled/000-default.conf \ + && sed -i "s@/var/www/html@/home/${user}/www/QloApps@g" /etc/apache2/sites-enabled/000-default.conf \ ##install supervisor and setup supervisord.conf file && apt-get install -y supervisor \ + && apt-get -y purge php8* \ + && apt-get -y autoremove \ + && apt-get clean \ + && rm -rf /usr/bin/php8* \ && mkdir -p /var/log/supervisor COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY credentials.sh /etc/credentials.sh RUN chmod a+x /etc/credentials.sh -WORKDIR /home/${user}/www/hotelcommerce +WORKDIR /home/${user}/www/QloApps EXPOSE 3306 80 443 CMD ["/usr/bin/supervisord"] diff --git a/README.md b/README.md index 4b8f4cf..7a6224f 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,11 @@ Docker is an open-source project that can be integrated with almost all the appl In the dockerized Qloapps architecture, we are using: -> Ubuntu 18.04 +> Ubuntu 20.04 -> Mysql Server 5.7 +> Mysql Server 8.0 -> PHP 7.2 +> PHP 7.4 > SSH Server @@ -39,20 +39,20 @@ To begin with: 2. After pulling the image, run your qloapps container by specifying ports and arguments as: -> docker run -tidp 80:80 -p 3306:3306 -p 2222:22 --name qloappsv150 -e USER_PASSWORD=qloappsuserpassword -e MYSQL_ROOT_PASSWORD=myrootpassword -e MYSQL_DATABASE=mydatabase webkul/qloapps_docker:latest +> docker run -tidp 80:80 -p 3306:3306 -p 2222:22 --name qloappsv161 -e USER_PASSWORD=qloappsuserpassword -e MYSQL_ROOT_PASSWORD=myrootpassword -e MYSQL_DATABASE=qlo161 webkul/qloapps_docker:latest 3. In the above command, your Host port 80 is linked with the docker port 80 running apache and Host port 3306 is linked with the docker port 3306 running MySQL, you can change the ports of your Host as per your requirements. Also, your SSH port 2222 is mapped with docker port 22 running SSH server. Please ensure that no other services are running on these host ports. 4. Mention your mysql root password, database name, 'qloapps' user password in arguments MYSQL_ROOT_PASSWORD, MYSQL_DATABASE and USER_PASSWORD respectively. -5. Check your running container using command *docker ps*. It will display you a container running with name qloappsv150. +5. Check your running container using command *docker ps*. It will display you a container running with name qloappsv161. 6. Now go to your browser and hit your IP or domain name and start qloapps installation process 7. After qloapps installation, remove "install" directory from server root directory inside the container. Run command: -> docker exec -i qloappsv150 rm -rf /home/qloapps/www/hotelcommerce/install . +> docker exec -i qloappsv161 rm -rf /home/qloapps/www/QloApps/install . 8. On clicking on backoffice URL, you will be promped to rename your backoffice URL. Go to running docker container and change the name of admin directory as mentioned. From a958237ba637404f0373534d3c7d82bdd45a9e01 Mon Sep 17 00:00:00 2001 From: Anuj Mishra <113639224+Anuj-Mishra8853@users.noreply.github.com> Date: Fri, 18 Oct 2024 14:30:23 +0530 Subject: [PATCH 2/7] Update README.md --- README.md | 112 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 76 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 7a6224f..cc1b10a 100644 --- a/README.md +++ b/README.md @@ -1,70 +1,110 @@ -## WHAT IS QLOAPPS +# What is QloApps? +QloApps is a free, fully customizable open-source hotel management and reservation system. It enables users to launch a user-friendly hotel booking website and manage both online and offline bookings. Suitable for small independent hotels as well as large hotel chains, QloApps serves as a comprehensive solution for all hotel business needs. -Qloapps is an open source, free and customizable online reservation system. You can launch a userfriendly site and can manage online as well as offline bookings. Using this you can easily launch your hotel booking website and even manage your offline booking too. This package is developed on top of Prestashop 1.6. +# How to Deploy QloApps with Docker +## Prerequisites +Before proceeding, ensure you have the latest version of Docker installed along with its dependencies, as per your operating system. For detailed instructions, refer to the Docker installation guide. -## DOCKERIZING QLOAPPS +## The QloApps Docker image architecture includes: -Docker is an open-source project that can be integrated with almost all the applications allowing scope of isolation and flexibility. It can be integrated with Qloapps. +Ubuntu 20.04 +MySQL Server 5.7 +PHP 7.4 +Additionally, verify that your user has the necessary privileges to run Docker commands. -## PREREQUISITES +## Important Note +The MySQL root password, database name, and SSH user password are not preset. Users must provide these details as arguments when running the Docker image. -> Install lastest avaiable Docker version and its dependencies according to your OS version. Refer to link https://docs.docker.com/install/linux/docker-ce/ubuntu/#prerequisites. +The default SSH user created during the image build is 'qloapps.' You can modify the user argument in the Dockerfile and rebuild the image to suit your requirements. -> Check if your user has access privileges to run docker commands. +# Procedure +# Step 1: Pull the Docker Image +Begin by pulling the Docker image from Docker Hub with the following command: +``` +docker pull webkul/qloapps_docker:latest +``` -#### NOTE TO THE USER +# Step 2: Run the Container +After pulling the image, run the container, specifying the required ports and arguments: -> Mysql root password, Mysql Database name and SSH user password is not set. Users have to pass *Mysql root password, database name, and SSH user password* as arguments while running the docker image. +``` +docker run -tidp 80:80 -p 3306:3306 -p 2222:22 --name qloappsv161 -e USER_PASSWORD=qloappsuserpassword -e MYSQL_ROOT_PASSWORD=myrootpassword -e MYSQL_DATABASE=qlo161 webkul/qloapps_docker:latest +``` +**Note:** Ensure that no other services are using ports 80, 2222, and 3306. If these ports are occupied, specify alternative ports as needed. -> Default SSH user is created as "qloapps" while building this image. You can change user argument in Dockerfile and rebuild the docker image for your own use. +In this command: -> +Host port 80 is mapped to Docker port 80 (Apache). +Host port 3306 is mapped to Docker port 3306 (MySQL). +SSH port 2222 is mapped to Docker port 22 (SSH server). +Please make sure that no other services are running on these host ports. +## Important: Replace MYSQL_ROOT_PASSWORD, MYSQL_DATABASE, and USER_PASSWORD with your own values in the command. -## DOCKERIZING QLOAPPS +# Step 3: Verify the Running Container +To check if your container is running, use the command: -In the dockerized Qloapps architecture, we are using: +``` +docker ps +``` -> Ubuntu 20.04 +You should see the container named 'qloappsv161'. -> Mysql Server 8.0 +Next, open your browser and navigate to your server's IP address or domain name to initiate the QloApps installation process. -> PHP 7.4 +After completing the installation, remove the '/install' directory from the server root directory inside the container by executing: -> SSH Server +``` +docker exec -i qloappsv161 rm -rf /home/qloapps/www/QloApps/install +``` -To begin with: +# Step 4: Rename the Admin Directory +Upon accessing the back office URL, you will be prompted to rename your admin directory. You can do this by entering the running container and renaming the directory as needed, for example, to "adminhtml": -1. Pull qloapps docker image from docker hub by running command "docker pull webkul/qloapps:latest". +``` +docker exec -i qloappsv161 mv /home/qloapps/www/QloApps/admin /home/qloapps/www/QloApps/adminhtml +``` -2. After pulling the image, run your qloapps container by specifying ports and arguments as: +# Step 5: Access QloApps via SSH +To access your QloApps files and directories, SSH into your Docker container with the following command: -> docker run -tidp 80:80 -p 3306:3306 -p 2222:22 --name qloappsv161 -e USER_PASSWORD=qloappsuserpassword -e MYSQL_ROOT_PASSWORD=myrootpassword -e MYSQL_DATABASE=qlo161 webkul/qloapps_docker:latest +``` +ssh qloapps@your_ip -p 2222 +``` -3. In the above command, your Host port 80 is linked with the docker port 80 running apache and Host port 3306 is linked with the docker port 3306 running MySQL, you can change the ports of your Host as per your requirements. Also, your SSH port 2222 is mapped with docker port 22 running SSH server. Please ensure that no other services are running on these host ports. +# --For Older Versions (>=1.6.0)-- -4. Mention your mysql root password, database name, 'qloapps' user password in arguments MYSQL_ROOT_PASSWORD, MYSQL_DATABASE and -USER_PASSWORD respectively. +To deploy older versions, replace qloappsv161 with the desired version, such as qloappsv160 or qloappsv159. The document root path will be /home/qloapps/www/hotelcommerce/. -5. Check your running container using command *docker ps*. It will display you a container running with name qloappsv161. +## Example +To pull a specific version, select the version from Docker Hub tags and use: -6. Now go to your browser and hit your IP or domain name and start qloapps installation process +``` +docker pull webkul/qloapps_docker:[Version] +``` -7. After qloapps installation, remove "install" directory from server root directory inside the container. Run command: +After pulling the image, run the container by specifying the version in the command: -> docker exec -i qloappsv161 rm -rf /home/qloapps/www/QloApps/install . +``` +docker run -tidp 80:80 -p 3306:3306 -p 2222:22 --name qloappsv161 -e USER_PASSWORD=qloappsuserpassword -e MYSQL_ROOT_PASSWORD=myrootpassword -e MYSQL_DATABASE=qlo161 webkul/qloapps_docker:[Version] +``` -8. On clicking on backoffice URL, you will be promped to rename your backoffice URL. Go to running docker container and change the name of admin directory as mentioned. +Then, follow the installation process as outlined previously. -9. To access your qloapps files and directories, you can SSH in your docker container as: +After installation, remove the '/install' directory: -> ssh qloapps@mention_your_ip -p 2222 +``` +docker exec -i [Your_container_name] rm -rf /home/qloapps/www/hotelcommerce/install +``` -Note -: If you are running any other services on your host at port 80, 22 and 3306 then you have to mention other ports in step 2. - -## GETTING SUPPORT - -If you have any issues, contact us at support@qloapps.com or raise ticket at https://webkul.uvdesk.com/ +Rename the admin directory as needed: +``` +docker exec -i [Your_container_name] mv /home/qloapps/www/QloApps/admin /home/qloapps/www/QloApps/adminhtml +``` +And rest remain the same as previous. + +# Getting Support +If you encounter any issues or have questions, please contact us at support@qloapps.com or raise a ticket at QloApps Support. Thank you. From 49df649d3611ff5074184904fa76755f765a183a Mon Sep 17 00:00:00 2001 From: Anuj Mishra <113639224+Anuj-Mishra8853@users.noreply.github.com> Date: Mon, 4 Nov 2024 12:49:07 +0530 Subject: [PATCH 3/7] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1dcba9d..9c744ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ RUN apt-get update \ && apt-get install -y php$php_version libapache2-mod-php$php_version php$php_version-bcmath php$php_version-cli php$php_version-json php$php_version-curl php$php_version-fpm php$php_version-gd php$php_version-ldap php$php_version-mbstring php$php_version-mysql php$php_version-soap php$php_version-sqlite3 php$php_version-xml php$php_version-zip php$php_version-intl php-imagick \ && echo "date.timezone = Asia/Kolkata" >> /etc/php/$php_version/apache2/php.ini \ && sed -i -e 's/memory_limit = .*/memory_limit = '${memory_limit}'/' -e 's/file_uploads = .*/file_uploads = '${file_uploads}'/' -e 's/allow_url_fopen = .*/allow_url_fopen = '${allow_url_fopen}'/' -e 's/max_execution_time = .*/max_execution_time = '${max_execution_time}'/' -e 's/upload_max_filesize = .*/upload_max_filesize = '${upload_max_filesize}'/' -e 's/post_max_size = .*/post_max_size = '${post_max_size}'/' -e 's/max_input_vars = .*/max_input_vars = '${max_input_vars}'/' /etc/php/$php_version/apache2/php.ini \ - # && apt-get -y install mysql-server \ + && apt-get -y install mysql-server \ && apt-get install -y git nano vim curl openssh-server \ ##setup non root user && useradd -m -s /bin/bash ${user} \ From 1cf61c0dcc5b2fb3d19ec4cdf3dda0171504d9c4 Mon Sep 17 00:00:00 2001 From: Anuj Mishra <113639224+Anuj-Mishra8853@users.noreply.github.com> Date: Mon, 4 Nov 2024 18:15:36 +0530 Subject: [PATCH 4/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cc1b10a..b31f574 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Before proceeding, ensure you have the latest version of Docker installed along ## The QloApps Docker image architecture includes: Ubuntu 20.04 -MySQL Server 5.7 +MySQL Server 8.0 PHP 7.4 Additionally, verify that your user has the necessary privileges to run Docker commands. From 2c67a748066770ab4a7481a5904c38f10b4ac04a Mon Sep 17 00:00:00 2001 From: Anuj Mishra <113639224+Anuj-Mishra8853@users.noreply.github.com> Date: Mon, 4 Nov 2024 18:16:31 +0530 Subject: [PATCH 5/7] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9c744ef..b1a802d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ RUN apt-get update \ && apt-get install -y software-properties-common \ && apt-get install -y language-pack-en-base \ && LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php \ - &&apt-get update \ + && apt-get update \ && apt-get install -y php$php_version libapache2-mod-php$php_version php$php_version-bcmath php$php_version-cli php$php_version-json php$php_version-curl php$php_version-fpm php$php_version-gd php$php_version-ldap php$php_version-mbstring php$php_version-mysql php$php_version-soap php$php_version-sqlite3 php$php_version-xml php$php_version-zip php$php_version-intl php-imagick \ && echo "date.timezone = Asia/Kolkata" >> /etc/php/$php_version/apache2/php.ini \ && sed -i -e 's/memory_limit = .*/memory_limit = '${memory_limit}'/' -e 's/file_uploads = .*/file_uploads = '${file_uploads}'/' -e 's/allow_url_fopen = .*/allow_url_fopen = '${allow_url_fopen}'/' -e 's/max_execution_time = .*/max_execution_time = '${max_execution_time}'/' -e 's/upload_max_filesize = .*/upload_max_filesize = '${upload_max_filesize}'/' -e 's/post_max_size = .*/post_max_size = '${post_max_size}'/' -e 's/max_input_vars = .*/max_input_vars = '${max_input_vars}'/' /etc/php/$php_version/apache2/php.ini \ From 6b8088e4c85f4f3aa147ad84a9458987dc31a834 Mon Sep 17 00:00:00 2001 From: Anuj Mishra <113639224+Anuj-Mishra8853@users.noreply.github.com> Date: Mon, 4 Nov 2024 18:18:58 +0530 Subject: [PATCH 6/7] Update README.md --- README.md | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/README.md b/README.md index b31f574..baebfc9 100644 --- a/README.md +++ b/README.md @@ -71,38 +71,6 @@ To access your QloApps files and directories, SSH into your Docker container wit ``` ssh qloapps@your_ip -p 2222 ``` - -# --For Older Versions (>=1.6.0)-- - -To deploy older versions, replace qloappsv161 with the desired version, such as qloappsv160 or qloappsv159. The document root path will be /home/qloapps/www/hotelcommerce/. - -## Example -To pull a specific version, select the version from Docker Hub tags and use: - -``` -docker pull webkul/qloapps_docker:[Version] -``` - -After pulling the image, run the container by specifying the version in the command: - -``` -docker run -tidp 80:80 -p 3306:3306 -p 2222:22 --name qloappsv161 -e USER_PASSWORD=qloappsuserpassword -e MYSQL_ROOT_PASSWORD=myrootpassword -e MYSQL_DATABASE=qlo161 webkul/qloapps_docker:[Version] -``` - -Then, follow the installation process as outlined previously. - -After installation, remove the '/install' directory: - -``` -docker exec -i [Your_container_name] rm -rf /home/qloapps/www/hotelcommerce/install -``` - -Rename the admin directory as needed: - -``` -docker exec -i [Your_container_name] mv /home/qloapps/www/QloApps/admin /home/qloapps/www/QloApps/adminhtml -``` -And rest remain the same as previous. # Getting Support If you encounter any issues or have questions, please contact us at support@qloapps.com or raise a ticket at QloApps Support. From e93b5a1cf3486ce3b6a9342f448d86f5fb822d5a Mon Sep 17 00:00:00 2001 From: Anuj Mishra <113639224+Anuj-Mishra8853@users.noreply.github.com> Date: Wed, 6 Nov 2024 18:19:47 +0530 Subject: [PATCH 7/7] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b1a802d..b34f1cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN apt-get update \ && useradd -m -s /bin/bash ${user} \ && mkdir -p /home/${user}/www \ ##Download Qloapps latest version - && cd /home/${user}/www && git clone https://github.com/Qloapps/QloApps.git \ + && cd /home/${user}/www && git clone -b v1.6.1 https://github.com/Qloapps/QloApps.git \ ##change file permission and ownership && find /home/${user}/www -type f -exec chmod 644 {} \; \ && find /home/${user}/www -type d -exec chmod 755 {} \; \