add Docker for deploy
This commit is contained in:
parent
7d149e8845
commit
6e7ed94654
|
@ -0,0 +1,24 @@
|
|||
# syntax = edrevo/dockerfile-plus
|
||||
|
||||
INCLUDE+ Dockerfile.dev
|
||||
|
||||
ENV PORT=80
|
||||
|
||||
COPY composer.json composer.lock ./
|
||||
#COPY app/Helpers/helpers.php ./app/Helpers/helpers.php
|
||||
|
||||
RUN composer install --prefer-dist --no-scripts --no-dev --no-autoloader
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN composer dump-autoload --no-dev --optimize
|
||||
|
||||
RUN npm run prod
|
||||
|
||||
CMD ["bash", "-c", "make db-prepare start-app"]
|
||||
|
||||
EXPOSE ${PORT}
|
|
@ -0,0 +1,42 @@
|
|||
FROM ubuntu:22.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV TZ=Europe/Moscow
|
||||
ENV PATH=node_modules/.bin:$PATH
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
make \
|
||||
curl \
|
||||
git \
|
||||
libpq-dev \
|
||||
libzip-dev \
|
||||
sqlite3 \
|
||||
unzip \
|
||||
zip \
|
||||
php \
|
||||
php-bcmath \
|
||||
php-exif \
|
||||
php-pdo \
|
||||
php-pgsql \
|
||||
php-pgsql \
|
||||
php-zip \
|
||||
php-xdebug \
|
||||
php-dom \
|
||||
php-xml \
|
||||
php-mbstring \
|
||||
php-sqlite3 \
|
||||
php-curl
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
software-properties-common \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
COPY ./xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||
|
||||
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
|
||||
RUN apt-get update && apt-get install -y nodejs
|
||||
|
||||
ENV PATH=node_modules/.bin:$PATH
|
Loading…
Reference in New Issue