Skip to content

Commit 84d7983

Browse files
author
Jovert Lota Palonpon
authored
wip (#47)
1 parent b4ca8b8 commit 84d7983

File tree

6 files changed

+18
-7
lines changed

6 files changed

+18
-7
lines changed

.docker/php-fpm/Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,15 @@ COPY database ${MASTER_DIR}/database
4040
RUN composer install --no-interaction --no-plugins --no-scripts
4141

4242
COPY . ${MASTER_DIR}
43-
COPY ./.docker/scripts/queuer.sh /usr/local/bin/laravel-queuer
44-
COPY ./.docker/scripts/scheduler.sh /usr/local/bin/laravel-scheduler
45-
46-
RUN chmod -R 775 /var/www/html/storage
43+
COPY ./.docker/php-fpm/init.sh /usr/local/bin/init
44+
COPY ./.docker/php-fpm/after.sh /usr/local/bin/after
45+
COPY ./.docker/queuer/init.sh /usr/local/bin/laravel-queuer
46+
COPY ./.docker/scheduler/init.sh /usr/local/bin/laravel-scheduler
47+
48+
RUN chmod -R 775 ${MASTER_DIR}/storage ${MASTER_DIR}/bootstrap/cache
49+
RUN chmod u+x /usr/local/bin/init
50+
RUN chmod u+x /usr/local/bin/after
4751
RUN chmod u+x /usr/local/bin/laravel-queuer
4852
RUN chmod u+x /usr/local/bin/laravel-scheduler
4953

50-
EXPOSE 9000
51-
CMD ["php-fpm"]
54+
ENTRYPOINT ["init", "--port", "9000"]

.docker/php-fpm/after.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
if [ "$PHP_ENV" != "development" ]; then
4+
chown -R www-data /var/www/html
5+
fi

.docker/php-fpm/init.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
exec php-fpm
File renamed without changes.
File renamed without changes.

.docker/webserver/nginx.conf.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ server {
2626
server {
2727
listen 80;
2828
listen [::]:80;
29-
server_name phpmyadmin.laravel-react-admin.test;
29+
server_name phpmyadmin.example.com;
3030
location / {
3131
proxy_set_header Host $host;
3232
proxy_set_header X-Real-IP $remote_addr;

0 commit comments

Comments
 (0)