From ba5dc9a9179f99127c0a6b3d00fb155daa8d2bb1 Mon Sep 17 00:00:00 2001 From: goja288 Date: Fri, 12 Nov 2021 16:00:36 -0300 Subject: [PATCH] Add Dockerfiles to project --- .env.example | 0 .gitignore | 2 ++ Dockerfile | 22 +++++++++++++++++ README.md | 1 + docker-compose.yml | 39 +++++++++++++++++++++++++++++++ src/data_files/README.md | 8 +++++++ src/data_files_archives/README.md | 1 + 7 files changed, 73 insertions(+) create mode 100644 .env.example create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 docker-compose.yml create mode 100644 src/data_files/README.md create mode 100644 src/data_files_archives/README.md diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..e69de29b diff --git a/.gitignore b/.gitignore index 172af267..6e3f05fc 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ tests/test_results/reports vendor composer.lock __* +.env +.config.ini.php diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..64770ed5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM php:7.0-apache + +RUN usermod -u 1000 www-data +RUN groupmod -g 1000 www-data + +RUN apt-get update \ + && apt-get install -y libicu-dev \ + && docker-php-ext-install intl + +RUN docker-php-ext-install mysqli pdo_mysql mbstring + +ENV PHP_TIMEZONE America/Montevideo + +ENV APACHE_DOC_ROOT /var/www/html + +RUN a2enmod rewrite + +RUN apt-get update \ + && apt-get install -y ssmtp \ + && apt-get clean \ + && echo "FromLineOverride=YES" >> /etc/ssmtp/ssmtp.conf \ + && echo 'sendmail_path = "/usr/sbin/ssmtp -t"' > /usr/local/etc/php/conf.d/mail.ini diff --git a/README.md b/README.md new file mode 100644 index 00000000..eefb7187 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# LOVD+ v.3.0 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..8ee567ce --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,39 @@ +version: '3.8' +services: + lovd: + build: + context: ./ + dockerfile: Dockerfile + depends_on: + - db + volumes: + - ./src:/var/www/html/ + ports: + - 8000:80 + db: + container_name: db + image: mysql:5.6 + restart: always + environment: + MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} + MYSQL_DATABASE: ${MYSQL_DATABASE} + MYSQL_USER: ${MYSQL_USER} + MYSQL_PASSWORD: ${MYSQL_PASSWORD} + + ports: + - "9906:3306" + env_file: + - .env + phpmyadmin: + image: phpmyadmin/phpmyadmin + ports: + - '8080:80' + restart: always + environment: + PMA_HOST: db + depends_on: + - db +networks: + default: + external: + name: lovdplus \ No newline at end of file diff --git a/src/data_files/README.md b/src/data_files/README.md new file mode 100644 index 00000000..d3b8084c --- /dev/null +++ b/src/data_files/README.md @@ -0,0 +1,8 @@ +The following path is used by the LOVD API to write files to that are to be +imported automatically. Other processes can also store files there that are +to be imported. This setting is optional. +For LOVD+, this path is where your data files need to be located. +If filled in, make sure the directory is readable and writable for the user +running the webserver. +Preferably, use a directory outside of the document root, or otherwise block +the directory from being read directly by the webserver. \ No newline at end of file diff --git a/src/data_files_archives/README.md b/src/data_files_archives/README.md new file mode 100644 index 00000000..3494dc8c --- /dev/null +++ b/src/data_files_archives/README.md @@ -0,0 +1 @@ +The following path is where LOVD will write automatically imported files to. \ No newline at end of file