From d67b622d6502b84ec0676786026acbfc8867adcd Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Wed, 22 Apr 2020 20:50:56 +0200 Subject: [PATCH] Removed old docker files --- docker/.env.example | 17 ------------- docker/Dockerfile | 25 ------------------- docker/docker-compose.prod.yml | 30 ----------------------- docker/docker-entrypoint.sh | 45 ---------------------------------- 4 files changed, 117 deletions(-) delete mode 100644 docker/.env.example delete mode 100644 docker/Dockerfile delete mode 100644 docker/docker-compose.prod.yml delete mode 100644 docker/docker-entrypoint.sh diff --git a/docker/.env.example b/docker/.env.example deleted file mode 100644 index aeef4ea3..00000000 --- a/docker/.env.example +++ /dev/null @@ -1,17 +0,0 @@ -# Before deploying to production change to harder password, and don't commit it to git. -DB_USERNAME=easyappointments -DB_NAME=easyappointments -DB_PASSWORD=easyappointments - -# Change to your installation address. -APP_URL=localhost -APP_HOST=0.0.0.0 -APP_PORT=80 - -# Email settings - set to 'smtp' and provide SMTP settings if you want to send emails. -EMAIL_PROTOCOL=mail -SMTP_HOST=smtp.gmail.com -SMTP_USER=user -SMTP_PASS=password -SMTP_CRYPTO=ssl -SMTP_PORT=25 diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index 0d60a362..00000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM php:7.0-apache - -ENV PROJECT_DIR=/var/www/html \ - APP_URL=localhost - -RUN docker-php-ext-install mysqli gettext - -RUN apt-get update -y && apt-get install -y libwebp-dev libjpeg62-turbo-dev libpng-dev libxpm-dev \ - libfreetype6-dev - -RUN docker-php-ext-configure gd --with-gd --with-webp-dir --with-jpeg-dir \ - --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir \ - --enable-gd-native-ttf - -RUN docker-php-ext-install gd - -COPY ./src $PROJECT_DIR -COPY docker-entrypoint.sh /docker-entrypoint.sh - -RUN sed -i 's/\r//' /docker-entrypoint.sh - -VOLUME $PROJECT_DIR/storage - -ENTRYPOINT ["/bin/bash", "/docker-entrypoint.sh"] -CMD ["run"] diff --git a/docker/docker-compose.prod.yml b/docker/docker-compose.prod.yml deleted file mode 100644 index da728d9d..00000000 --- a/docker/docker-compose.prod.yml +++ /dev/null @@ -1,30 +0,0 @@ -version: '2' -services: - database: - image: mysql:5.7 - environment: - - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD} - - MYSQL_DATABASE=${DB_NAME} - - MYSQL_USER=${DB_USERNAME} - - MYSQL_PASSWORD=${DB_PASSWORD} - volumes: - - easyappointments-data:/var/lib/mysql - restart: always - - application: - image: easyappointments - build: - context: . - ports: - - 80:80 - environment: - - DB_HOST=database:3306 - env_file: - - .env - volumes: - - easyappointments-storage:/var/www/html/src/storage - restart: always - -volumes: - easyappointments-data: - easyappointments-storage: diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh deleted file mode 100644 index 27b1b019..00000000 --- a/docker/docker-entrypoint.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env sh - -createAppSettings() { - cp $PROJECT_DIR/config-sample.php $PROJECT_DIR/config.php - sed -i "s/DB_HOST = ''/DB_HOST = '$DB_HOST'/g" $PROJECT_DIR/config.php - sed -i "s/DB_USERNAME = ''/DB_USERNAME = '$DB_USERNAME'/g" $PROJECT_DIR/config.php - sed -i "s/DB_PASSWORD = ''/DB_PASSWORD = '$DB_PASSWORD'/g" $PROJECT_DIR/config.php - sed -i "s/DB_NAME = ''/DB_NAME = '$DB_NAME'/g" $PROJECT_DIR/config.php - if [ "$EMAIL_PROTOCOL" = "smtp" ]; then - echo "Setting up email..." - sed -i "s/\$config\['protocol'\] = 'mail'/\$config['protocol'] = 'smtp'/g" $PROJECT_DIR/application/config/email.php - sed -i "s#// \$config\['smtp_host'\] = ''#\$config['smtp_host'] = '$SMTP_HOST'#g" $PROJECT_DIR/application/config/email.php - sed -i "s#// \$config\['smtp_user'\] = ''#\$config['smtp_user'] = '$SMTP_USER'#g" $PROJECT_DIR/application/config/email.php - sed -i "s#// \$config\['smtp_pass'\] = ''#\$config['smtp_pass'] = '$SMTP_PASS'#g" $PROJECT_DIR/application/config/email.php - sed -i "s#// \$config\['smtp_crypto'\] = 'ssl'#\$config['smtp_crypto'] = '$SMTP_CRYPTO'#g" $PROJECT_DIR/application/config/email.php - sed -i "s#// \$config\['smtp_port'\] = 25#\$config['smtp_port'] = $SMTP_PORT#g" $PROJECT_DIR/application/config/email.php - fi - sed -i "s/url-to-easyappointments-directory/$APP_URL/g" $PROJECT_DIR/config.php - - chown -R www-data $PROJECT_DIR -} - -if [ "$1" = "run" ]; then - - echo "Preparing Easy!Appointments production configuration.." - - createAppSettings - - echo "Starting Easy!Appointments production server.." - - exec docker-php-entrypoint apache2-foreground - -elif [ "$1" = "dev" ]; then - - echo "Preparing Easy!Appointments development configuration.." - - createAppSettings - sed -i "s/DEBUG_MODE = FALSE/DEBUG_MODE = TRUE/g" $PROJECT_DIR/config.php - - echo "Starting Easy!Appointments production server.." - - exec docker-php-entrypoint apache2-foreground -fi - -exec $@