prodV1 #2

Open
RomanGolienko wants to merge 309 commits from prodV1 into main
2 changed files with 66 additions and 0 deletions
Showing only changes of commit 6e7ed94654 - Show all commits

24
Dockerfile Normal file
View File

@ -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}

42
Dockerfile.dev Normal file
View File

@ -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