From f4f017d3d95017ee7ea9345a945a1627e2720a37 Mon Sep 17 00:00:00 2001 From: Froz Date: Tue, 13 Sep 2022 12:29:54 -0700 Subject: [PATCH] Added Easy!Appoitnments --- README.md | 1 + easyappointments/README.md | 123 +++++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 easyappointments/README.md diff --git a/README.md b/README.md index ee966d9..85183bd 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ After you finish the A-Z guide. You can then follow application specific guides #### StarWhiz's App Specific Guides & References * [Vaultwarden formerly bitwarden_rs](https://github.com/StarWhiz/docker_deployment_notes/tree/master/bitwarden-vaultwarden) - Open Soruce Password Manager +* [Easy!Appointments]() * [Heimdall](https://github.com/StarWhiz/docker_deployment_notes/tree/master/heimdall) - Another Homepage Dashboard * [FreePBX+Asterisk](https://github.com/StarWhiz/docker_deployment_notes/tree/master/freepbx-asterisk) - VOIP & telephony server * [Jellyfin](https://github.com/StarWhiz/docker_deployment_notes/tree/master/jellyfin) - Open Source Plex / Media Server diff --git a/easyappointments/README.md b/easyappointments/README.md new file mode 100644 index 0000000..75c66d0 --- /dev/null +++ b/easyappointments/README.md @@ -0,0 +1,123 @@ +[Easy!Appointments - Self Hosted Appointment Scheduler by alextselegidis](https://github.com/alextselegidis/easyappointments) + +### Minimum File Structure +``` +/home/ +└── ~/ + └── docker/ + └── easyappointments/ + └── docker/ +``` + +The file structure here is slightly different from usual since we will be cloning a git repository to install this. Below are the steps needed to fully deploy easyappointments with our Caddy reverse proxy! + +### 1. Clone repository and optionally check out the develop branch +``` +cd ~/docker/ +git clone https://github.com/alextselegidis/easyappointments.git +git checkout -b develop +``` + +### 2. Navigate to cloned repository folder and copy composer.json and composer.lock to ./docker/server +``` +cd easyappointments +cp composer.lock docker/server +cp composer.json docker/server +``` + +### 3. Copy config-sample.php to config.php in the root repository and modify BASE_URL in config.php +``` +cp config-sample.php config.php +nano config.php +``` + +### 4. Modify permissions of the storage folder in the repository +``` +chown -R www-data:www-data storage/ +chmod -R 777 storage/ +``` + +### 5. Modify the Dockerfile in ./docker/server from the root repository +``` +nano docker/server/Dockerfile +``` +**Dockerfile** +``` +FROM php:7.4-apache + +ENV COMPOSER_ALLOW_SUPERUSER=1 + +COPY --from=composer /usr/bin/composer /usr/bin/composer +WORKDIR "/var/www/html" + +COPY composer.json /var/www/html/ +COPY composer.lock /var/www/html/ + +RUN apt-get update && apt-get install -y zip unzip git libpng-dev + +RUN docker-php-ext-install gd + +RUN composer install --no-scripts --no-interaction --optimize-autoloader + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get install -y \ + libfreetype6-dev \ + libjpeg62-turbo-dev \ + libpng-dev \ + && docker-php-ext-configure gd --with-freetype --with-jpeg \ + && docker-php-ext-install -j$(nproc) gd gettext mysqli pdo_mysql + +RUN pecl install xdebug \ + && docker-php-ext-enable xdebug + +RUN a2enmod rewrite +``` + +6. Modify docker-compose inside ./docker/ folder of the root repository +**docker-compose.yml** +``` + +version: "3.1" +services: + mysql: + image: mysql:5.7 + container_name: easyappointments-database + volumes: + - ./mysql:/var/lib/mysql + environment: + - MYSQL_ROOT_PASSWORD=root + - MYSQL_DATABASE=easyappointments +# ports: +# - "8001:3306" + server: + build: ./server + image: easyappointments-server:v1 + container_name: easyappointments-server +# ports: +# - "8000:80" + volumes: + - ../:/var/www/html + - /var/www/html/vendor + - ./server/php.ini:/usr/local/etc/php/conf.d/99-overrides.ini + +networks: + default: + external: + name: caddy_net +``` + + +### 7. Add to Caddyfile (from ~/docker/caddy) +Remember to `docker exec -w /etc/caddy caddy caddy reload` after editing your Caddyfile. +``` +appointments.example.com { + reverse_proxy easyappointments-server:80 +} +``` + +### 8. Deploy Application +``` +cd ~/docker/easyappointments/docker/ +docker-compose up -d +```