Skip to content

Commit 67e8d5f

Browse files
author
Jovert Lota Palonpon
committed
Restructured docker related things, resolve #38
1 parent 2ca29d0 commit 67e8d5f

File tree

6 files changed

+5
-10
lines changed

6 files changed

+5
-10
lines changed

.docker/db/.gitkeep

Whitespace-only changes.

Dockerfile renamed to .docker/php/Dockerfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ RUN ln -snf /usr/share/zoneinfo/${MASTER_TZ} /etc/localtime && echo ${MASTER_TZ}
99
# Install dependencies
1010
RUN apt-get update && apt-get install -y \
1111
build-essential \
12-
mysql-client \
1312
libzip-dev \
1413
libpng-dev \
1514
libjpeg62-turbo-dev \
@@ -37,7 +36,7 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
3736
COPY composer.lock composer.json ${MASTER_DIR}/
3837

3938
# This is included just to bypass errors thrown by composer scripts
40-
COPY ./database ${MASTER_DIR}/database
39+
COPY database ${MASTER_DIR}/database
4140

4241
WORKDIR ${MASTER_DIR}
4342

@@ -47,9 +46,5 @@ RUN composer install --no-interaction --no-plugins --no-scripts
4746
# Copy app
4847
COPY . ${MASTER_DIR}
4948

50-
# Give proper file permission & ownership
51-
# RUN chown -R www-data:www-data ${MASTER_DIR}
52-
# RUN chmod -R 755 ${MASTER_DIR}/storage
53-
5449
EXPOSE 9000
5550
CMD ["php-fpm"]
File renamed without changes.
File renamed without changes.

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ services:
33
laravel-react-admin-php:
44
build:
55
context: .
6-
dockerfile: Dockerfile
6+
dockerfile: ./.docker/php/Dockerfile
77
container_name: laravel-react-admin-php
88
restart: unless-stopped
99
working_dir: /var/www/html
1010
volumes:
1111
- ./:/var/www/html
12-
- ./php.ini:/usr/local/etc/php/conf.d/local.ini:ro
12+
- ./.docker/php/php.ini:/usr/local/etc/php/conf.d/local.ini:ro
1313
env_file:
1414
- .env
1515

@@ -22,7 +22,7 @@ services:
2222
- '443:443'
2323
volumes:
2424
- ./:/var/www/html
25-
- ./nginx.conf:/etc/nginx/conf.d/nginx.conf
25+
- ./.docker/webserver/nginx.conf:/etc/nginx/conf.d/nginx.conf
2626
depends_on:
2727
- laravel-react-admin-php
2828

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ To make this app run on **docker** you must add a custom host address pointing t
5050

5151
### Add a virtual host
5252

53-
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.
53+
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.
5454

5555
### You are good to go
5656

0 commit comments

Comments
 (0)