diff --git a/container/Dockerfile b/container/Dockerfile new file mode 100644 index 0000000..c1a545e --- /dev/null +++ b/container/Dockerfile @@ -0,0 +1,14 @@ +FROM php:7.4-apache + +RUN apt update && apt install -y git zip \ + && docker-php-ext-install mysqli pdo pdo_mysql +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + + +COPY . /var/www/html/asset-library + +WORKDIR /var/www/html/asset-library +RUN composer install +RUN a2enmod rewrite +RUN chown -R www-data:www-data . +USER www-data diff --git a/container/docker-compose.yml b/container/docker-compose.yml new file mode 100644 index 0000000..6fe3c8f --- /dev/null +++ b/container/docker-compose.yml @@ -0,0 +1,20 @@ +services: + gd-asset-library: + build: + context: ../ + dockerfile: ./container/Dockerfile + depends_on: + - database + ports: + - 8080:80 + database: + image: mariadb:11.3.2 + volumes: + - ../data:/docker-entrypoint-initdb.d:ro + expose: + - 3306 + environment: + MYSQL_USER: user + MYSQL_PASSWORD: password + MYSQL_DATABASE: asset-library + MARIADB_ROOT_PASSWORD: password