commit 59c8a62adaeebceabe669285b7ffbb49e8e7eeb9 Author: denisdulici Date: Tue Nov 5 18:06:24 2019 +0300 added current files diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1e0f6eb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM php:apache + +RUN apt-get update && apt-get install -y zip libzip-dev libpng-dev \ + && docker-php-ext-install pdo_mysql gd zip \ + && rm -rf /var/lib/apt/lists/* + +# Composer installation. +COPY --from=composer:latest /usr/bin/composer /usr/bin/composer + +# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser +ENV COMPOSER_ALLOW_SUPERUSER=1 +RUN composer global require hirak/prestissimo --prefer-dist --no-progress --no-suggest --classmap-authoritative \ + && composer clear-cache +ENV PATH="${PATH}:/root/.composer/vendor/bin" + +COPY . /var/www/html/ + +# Authorize these folders to be edited +RUN chmod -R 777 /var/www/html/storage +RUN chmod -R 777 /var/www/html/bootstrap/cache + +# Allow rewrite +RUN a2enmod rewrite diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1b3850a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,21 @@ +version: '3' +services: + mysql: + image: mysql:5 + ports: + - 3306:3306 + environment: + MYSQL_ROOT_PASSWORD: akaunting_root_password + MYSQL_DATABASE: akaunting_db + MYSQL_USER: akaunting_admin + MYSQL_PASSWORD: akaunting_password + web: + image: akaunting + volumes: + - ./:/var/www/html + ports: + - 8080:80 + environment: + APP_DEBUG: "true" + links: + - mysql