31 lines
No EOL
1.2 KiB
Docker
31 lines
No EOL
1.2 KiB
Docker
FROM php:fpm-bullseye
|
|
|
|
# Install prerequisites
|
|
RUN apt-get update && apt-get -y install wget git npm curl zip
|
|
RUN apt-get install -y libpq-dev \
|
|
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
|
|
&& docker-php-ext-install pdo pdo_pgsql pgsql
|
|
|
|
# Download composer
|
|
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
|
|
php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
|
|
php composer-setup.php && \
|
|
php -r "unlink('composer-setup.php');"
|
|
|
|
# Install composer and yarn
|
|
RUN npm install --global yarn
|
|
RUN wget https://get.symfony.com/cli/installer -O - | bash
|
|
|
|
COPY . /var/www/html/app/
|
|
|
|
WORKDIR /var/www/html/app
|
|
|
|
# Install stuff
|
|
RUN php ../composer.phar update dev
|
|
RUN yarn install && \
|
|
yarn build
|
|
|
|
RUN cp .env.staging .env
|
|
|
|
# Run Migration and dev-webserver
|
|
CMD /root/.symfony/bin/symfony console doctrine:migrations:migrate --no-interaction && /root/.symfony/bin/symfony serve --port=9999 --no-tls |