Skip to content

Commit

Permalink
Fix build step
Browse files Browse the repository at this point in the history
  • Loading branch information
ijpatricio committed May 31, 2023
1 parent 648d4b4 commit 65faa28
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions docker/prod-ssu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
FROM node:19 as static-assets
FROM serversideup/php:8.2-fpm-nginx as get-php-deps
WORKDIR /app
COPY . .
RUN composer install --no-dev --no-interaction --no-plugins --no-scripts --prefer-dist

FROM node:19 as static-assets
WORKDIR /app
COPY --from=get-php-deps /app .
RUN npm install
RUN npm run build

FROM serversideup/php:8.2-fpm-nginx
WORKDIR /var/www/html
Expand All @@ -14,15 +21,12 @@ RUN composer install --no-dev --no-interaction --no-plugins --no-scripts --prefe
COPY --chown=9999:9999 . .
RUN composer dump-autoload

#COPY --from=static-assets --chown=9999:9999 /app/public/build ./public/build
COPY --from=static-assets --chown=9999:9999 /app/public/build ./public/build
COPY --chmod=755 docker/prod-ssu/etc/s6-overlay/ /etc/s6-overlay/

RUN php artisan route:cache
RUN php artisan view:cache

WORKDIR /app
RUN npm install
RUN npm run build

RUN echo "alias ll='ls -al'" >>/etc/bash.bashrc
RUN echo "alias a='php artisan'" >>/etc/bash.bashrc
Expand Down

0 comments on commit 65faa28

Please sign in to comment.