Skip to content

Commit

Permalink
Restructured docker related things, resolve #38
Browse files Browse the repository at this point in the history
  • Loading branch information
Jovert Lota Palonpon committed Apr 6, 2019
1 parent 2ca29d0 commit 67e8d5f
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 10 deletions.
Empty file added .docker/db/.gitkeep
Empty file.
7 changes: 1 addition & 6 deletions Dockerfile → .docker/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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}

Expand All @@ -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"]
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 67e8d5f

Please sign in to comment.