update prod dockerfile
This commit is contained in:
parent
8b6598ea6b
commit
38cb3fddd9
@ -92,4 +92,4 @@
|
|||||||
},
|
},
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"prefer-stable": true
|
"prefer-stable": true
|
||||||
}
|
}
|
@ -1,16 +1,5 @@
|
|||||||
FROM node:19 as static-assets
|
FROM serversideup/php:8.2-fpm-nginx as base
|
||||||
WORKDIR /app
|
|
||||||
COPY . .
|
|
||||||
RUN npm install
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
FROM serversideup/php:8.2-fpm-nginx
|
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
ARG POSTGRES_VERSION=15
|
|
||||||
RUN apt-get update && apt-get install -y php-pgsql postgresql-client openssh-client git git-lfs jq
|
|
||||||
RUN apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
|
|
||||||
|
|
||||||
COPY docker/prod-ssu/nginx.conf /etc/nginx/conf.d/custom.conf
|
|
||||||
|
|
||||||
COPY composer.json composer.lock ./
|
COPY composer.json composer.lock ./
|
||||||
RUN composer install --no-dev --no-interaction --no-plugins --no-scripts --prefer-dist
|
RUN composer install --no-dev --no-interaction --no-plugins --no-scripts --prefer-dist
|
||||||
@ -18,11 +7,26 @@ RUN composer install --no-dev --no-interaction --no-plugins --no-scripts --prefe
|
|||||||
COPY --chown=9999:9999 . .
|
COPY --chown=9999:9999 . .
|
||||||
RUN composer dump-autoload
|
RUN composer dump-autoload
|
||||||
|
|
||||||
|
FROM node:19 as static-assets
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . .
|
||||||
|
COPY --from=base --chown=9999:9999 /var/www/html .
|
||||||
|
RUN npm install
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM serversideup/php:8.2-fpm-nginx
|
||||||
|
WORKDIR /var/www/html
|
||||||
|
ARG POSTGRES_VERSION=15
|
||||||
|
RUN apt-get update && apt-get install -y php-pgsql postgresql-client openssh-client git git-lfs jq
|
||||||
|
RUN apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
|
||||||
|
|
||||||
|
COPY docker/prod-ssu/nginx.conf /etc/nginx/conf.d/custom.conf
|
||||||
|
|
||||||
|
COPY --from=base --chown=9999:9999 /var/www/html .
|
||||||
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/
|
COPY --chmod=755 docker/prod-ssu/etc/s6-overlay/ /etc/s6-overlay/
|
||||||
|
|
||||||
RUN php artisan route:cache
|
RUN php artisan optimize
|
||||||
RUN php artisan view:cache
|
|
||||||
|
|
||||||
RUN echo "alias ll='ls -al'" >>/etc/bash.bashrc
|
RUN echo "alias ll='ls -al'" >>/etc/bash.bashrc
|
||||||
RUN echo "alias a='php artisan'" >>/etc/bash.bashrc
|
RUN echo "alias a='php artisan'" >>/etc/bash.bashrc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user