diff --git a/.docker/db/.gitkeep b/.docker/db/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Dockerfile b/.docker/php/Dockerfile similarity index 87% rename from Dockerfile rename to .docker/php/Dockerfile index d1002af..44b8fe3 100644 --- a/Dockerfile +++ b/.docker/php/Dockerfile @@ -9,7 +9,6 @@ RUN ln -snf /usr/share/zoneinfo/${MASTER_TZ} /etc/localtime && echo ${MASTER_TZ} # Install dependencies RUN apt-get update && apt-get install -y \ build-essential \ - mysql-client \ libzip-dev \ libpng-dev \ libjpeg62-turbo-dev \ @@ -37,7 +36,7 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local COPY composer.lock composer.json ${MASTER_DIR}/ # This is included just to bypass errors thrown by composer scripts -COPY ./database ${MASTER_DIR}/database +COPY database ${MASTER_DIR}/database WORKDIR ${MASTER_DIR} @@ -47,9 +46,5 @@ RUN composer install --no-interaction --no-plugins --no-scripts # Copy app COPY . ${MASTER_DIR} -# Give proper file permission & ownership -# RUN chown -R www-data:www-data ${MASTER_DIR} -# RUN chmod -R 755 ${MASTER_DIR}/storage - EXPOSE 9000 CMD ["php-fpm"] \ No newline at end of file diff --git a/php.ini b/.docker/php/php.ini similarity index 100% rename from php.ini rename to .docker/php/php.ini diff --git a/nginx.conf.example b/.docker/webserver/nginx.conf.example similarity index 100% rename from nginx.conf.example rename to .docker/webserver/nginx.conf.example diff --git a/docker-compose.yml b/docker-compose.yml index 3058cae..f02ed71 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,13 +3,13 @@ services: laravel-react-admin-php: build: context: . - dockerfile: Dockerfile + dockerfile: ./.docker/php/Dockerfile container_name: laravel-react-admin-php restart: unless-stopped working_dir: /var/www/html volumes: - ./:/var/www/html - - ./php.ini:/usr/local/etc/php/conf.d/local.ini:ro + - ./.docker/php/php.ini:/usr/local/etc/php/conf.d/local.ini:ro env_file: - .env @@ -22,7 +22,7 @@ services: - '443:443' volumes: - ./:/var/www/html - - ./nginx.conf:/etc/nginx/conf.d/nginx.conf + - ./.docker/webserver/nginx.conf:/etc/nginx/conf.d/nginx.conf depends_on: - laravel-react-admin-php diff --git a/readme.md b/readme.md index d250c78..2238598 100755 --- a/readme.md +++ b/readme.md @@ -50,7 +50,7 @@ To make this app run on **docker** you must add a custom host address pointing t ### Add a virtual host -A `nginx.conf.example` file is included to help you in configuring a _virtual host_ according to your host setup. It is better to just rename it to `nginx.conf` to avoid the file being included in your version control system. **Nginx** will automatically pick up every changes to this configuration file because it is _bind-mounted_ into its container. +A `nginx.conf.example` file is included inside `.docker/webserver` to help you in configuring a _virtual host_ according to your host setup. It is better to just rename it to `nginx.conf` to avoid the file being included in your version control system. **Nginx** will automatically pick up every changes to this configuration file because it is _bind-mounted_ into its container. ### You are good to go