Skip to content

Commit

Permalink
wip (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jovert Lota Palonpon authored Apr 24, 2019
1 parent b4ca8b8 commit 84d7983
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
15 changes: 9 additions & 6 deletions .docker/php-fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,15 @@ COPY database ${MASTER_DIR}/database
RUN composer install --no-interaction --no-plugins --no-scripts

COPY . ${MASTER_DIR}
COPY ./.docker/scripts/queuer.sh /usr/local/bin/laravel-queuer
COPY ./.docker/scripts/scheduler.sh /usr/local/bin/laravel-scheduler

RUN chmod -R 775 /var/www/html/storage
COPY ./.docker/php-fpm/init.sh /usr/local/bin/init
COPY ./.docker/php-fpm/after.sh /usr/local/bin/after
COPY ./.docker/queuer/init.sh /usr/local/bin/laravel-queuer
COPY ./.docker/scheduler/init.sh /usr/local/bin/laravel-scheduler

RUN chmod -R 775 ${MASTER_DIR}/storage ${MASTER_DIR}/bootstrap/cache
RUN chmod u+x /usr/local/bin/init
RUN chmod u+x /usr/local/bin/after
RUN chmod u+x /usr/local/bin/laravel-queuer
RUN chmod u+x /usr/local/bin/laravel-scheduler

EXPOSE 9000
CMD ["php-fpm"]
ENTRYPOINT ["init", "--port", "9000"]
5 changes: 5 additions & 0 deletions .docker/php-fpm/after.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

if [ "$PHP_ENV" != "development" ]; then
chown -R www-data /var/www/html
fi
3 changes: 3 additions & 0 deletions .docker/php-fpm/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

exec php-fpm
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .docker/webserver/nginx.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ server {
server {
listen 80;
listen [::]:80;
server_name phpmyadmin.laravel-react-admin.test;
server_name phpmyadmin.example.com;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down

0 comments on commit 84d7983

Please sign in to comment.