2023-06-15 08:56:36 +00:00
|
|
|
FROM serversideup/php:8.2-fpm-nginx as base
|
|
|
|
WORKDIR /var/www/html
|
|
|
|
|
|
|
|
COPY composer.json composer.lock ./
|
|
|
|
RUN composer install --no-dev --no-interaction --no-plugins --no-scripts --prefer-dist
|
|
|
|
|
|
|
|
COPY --chown=9999:9999 . .
|
|
|
|
RUN composer dump-autoload
|
|
|
|
|
2023-04-13 13:48:27 +00:00
|
|
|
FROM node:19 as static-assets
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
2023-06-15 08:56:36 +00:00
|
|
|
COPY --from=base --chown=9999:9999 /var/www/html .
|
2023-04-13 13:48:27 +00:00
|
|
|
RUN npm install
|
|
|
|
RUN npm run build
|
|
|
|
|
2023-04-12 19:23:32 +00:00
|
|
|
FROM serversideup/php:8.2-fpm-nginx
|
2023-04-13 13:48:27 +00:00
|
|
|
WORKDIR /var/www/html
|
2023-04-12 19:23:32 +00:00
|
|
|
ARG POSTGRES_VERSION=15
|
2023-06-15 08:56:36 +00:00
|
|
|
RUN apt-get update && apt-get install -y php-pgsql postgresql-client openssh-client git git-lfs jq
|
2023-05-16 08:12:34 +00:00
|
|
|
RUN apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
|
2023-04-12 19:23:32 +00:00
|
|
|
|
2023-05-26 08:37:18 +00:00
|
|
|
COPY docker/prod-ssu/nginx.conf /etc/nginx/conf.d/custom.conf
|
|
|
|
|
2023-06-15 08:56:36 +00:00
|
|
|
COPY --from=base --chown=9999:9999 /var/www/html .
|
2023-04-28 08:04:16 +00:00
|
|
|
COPY --from=static-assets --chown=9999:9999 /app/public/build ./public/build
|
|
|
|
COPY --chmod=755 docker/prod-ssu/etc/s6-overlay/ /etc/s6-overlay/
|
2023-04-13 13:48:27 +00:00
|
|
|
|
2023-06-15 08:56:36 +00:00
|
|
|
RUN php artisan optimize
|
2023-05-16 08:07:08 +00:00
|
|
|
|
|
|
|
RUN echo "alias ll='ls -al'" >>/etc/bash.bashrc
|
|
|
|
RUN echo "alias a='php artisan'" >>/etc/bash.bashrc
|
|
|
|
RUN echo "alias mfs='php artisan migrate:fresh --seed'" >>/etc/bash.bashrc
|
|
|
|
RUN echo "alias cda='composer dump-autoload'" >>/etc/bash.bashrc
|
|
|
|
RUN echo "alias run='./scripts/run'" >>/etc/bash.bashrc
|
2023-05-26 07:45:18 +00:00
|
|
|
RUN echo "alias logs='tail -f storage/logs/laravel.log'" >>/etc/bash.bashrc
|