Removed old docker files
This commit is contained in:
parent
025b1c8b2a
commit
d67b622d65
4 changed files with 0 additions and 117 deletions
|
@ -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
|
|
@ -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"]
|
|
@ -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:
|
|
@ -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 $@
|
Loading…
Reference in a new issue