diff --git a/.gitignore b/.gitignore index 7827c57a..f84728c0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ .php_cs.cache .phpunit.result.cache composer.lock -docker/docker-compose.yml plugins/* triggers/* tests/coverage/* diff --git a/docker/Dockerfile b/docker/Dockerfile index c879b37a..477511f5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -10,7 +10,7 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local # add custom PHP.ini settings RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" -COPY ./includes/custom.ini /usr/local/etc/php/conf.d/custom.ini +COPY ./custom.ini /usr/local/etc/php/conf.d/custom.ini WORKDIR /var/www/html/ diff --git a/docker/includes/custom.ini b/docker/custom.ini similarity index 100% rename from docker/includes/custom.ini rename to docker/custom.ini diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 00000000..385901ed --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,46 @@ +version: '3' + +services: + arc2: + build: + context: . + dockerfile: Dockerfile + container_name: arc2 + volumes: + - ./../:/var/www/html/ + depends_on: + - db + links: + - db:mysql + + db: + image: mariadb:10.3.29 + container_name: db + environment: + MYSQL_DATABASE: arc2 + MYSQL_ROOT_PASSWORD: Pass123 + volumes: + # server is empty at the start because it uses RAM to store data + - data:/var/cache + - data:/var/lib/mysql + # for SQL commands to be run after the server starts + - ./sql:/docker-entrypoint-initdb.d + + phpmyadmin: + image: phpmyadmin/phpmyadmin + container_name: phpmyadmin + links: + - db:mysql + ports: + - 8002:80 + environment: + MYSQL_USERNAME: root + MYSQL_ROOT_PASSWORD: Pass123 + PMA_HOST: mysql + UPLOAD_LIMIT: 2G + +volumes: + data: + driver_opts: + type: tmpfs + device: tmpfs diff --git a/docker/includes/arc2_test.sql b/docker/sql/arc2_test.sql similarity index 100% rename from docker/includes/arc2_test.sql rename to docker/sql/arc2_test.sql