Skip to content

Commit

Permalink
Fix build development
Browse files Browse the repository at this point in the history
  • Loading branch information
tharlestsa committed Aug 14, 2023
1 parent 09e1c13 commit 9b9bf9b
Show file tree
Hide file tree
Showing 7 changed files with 507 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/public/storage
/storage/*.key
/vendor
.env
docker/development/.env
.env.backup
.env.production
.phpunit.result.cache
Expand All @@ -16,3 +16,4 @@ yarn-error.log
/.fleet
/.idea
/.vscode
*.env
13 changes: 4 additions & 9 deletions docker/development/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ RUN apt-get update \


COPY ./deploy/local.ini /usr/local/etc/php/local.ini
COPY ./deploy/www.conf /usr/local/etc/php-fpm.d/www.conf

COPY ./deploy/conf.d/nginx.conf /etc/nginx/nginx.conf
COPY ./post_deploy.sh /var/www/post_deploy.sh

Expand All @@ -84,26 +86,19 @@ COPY ./.env /var/www/.env
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
git clone -b ${BRANCH} ${URL_TO_APPLICATION_GITHUB} /tmp/app && \
cp -R /tmp/app/server /var/www/ && \
rm -Rf /tmp/app/
rm -Rf /tmp/app/ && \
mkdir -p /usr/local/log/

RUN usermod -u 1000 www-data && \
chown www-data:www-data /var/www/ && \
chown -R www-data:www-data /var/www/server/* && \
chmod -R 775 /var/www/server/storage && \
chmod -R 775 /var/www/server/bootstrap/cache && \
chown www-data:www-data /var/www/server/bootstrap/cache && \
chown www-data:www-data /var/www/server/storage && \
chmod +x /var/www/post_deploy.sh && \
composer install && \
composer dump-autoload && \
php artisan config:cache && \
php artisan route:cache && \
php artisan view:cache && \
composer clear-cache

EXPOSE 80


CMD [ "sh", "/var/www/post_deploy.sh" ]


4 changes: 2 additions & 2 deletions docker/development/deploy/conf.d/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
user root;
user www-data;
worker_processes auto;

events {
Expand Down Expand Up @@ -34,7 +34,7 @@ http {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_buffering off;
fastcgi_buffering off;
}

location / {
Expand Down
Loading

0 comments on commit 9b9bf9b

Please sign in to comment.