2021-12-23 13:24:39 +01:00
|
|
|
FROM php:fpm-bullseye
|
2021-05-05 11:50:04 +02:00
|
|
|
|
2021-05-06 15:46:34 +02:00
|
|
|
# Install prerequisites
|
2021-05-05 12:33:28 +02:00
|
|
|
RUN apt-get update && apt-get -y install wget git npm curl zip
|
2021-05-05 11:50:04 +02:00
|
|
|
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
|
|
|
|
|
2021-05-06 15:46:34 +02:00
|
|
|
# Download composer
|
2021-05-05 11:50:04 +02:00
|
|
|
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
|
2021-12-23 13:24:39 +01:00
|
|
|
php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
|
2021-05-05 11:50:04 +02:00
|
|
|
php composer-setup.php && \
|
|
|
|
php -r "unlink('composer-setup.php');"
|
|
|
|
|
2021-05-06 15:46:34 +02:00
|
|
|
# Install composer and yarn
|
2021-05-05 11:50:04 +02:00
|
|
|
RUN npm install --global yarn
|
2021-05-05 12:33:28 +02:00
|
|
|
RUN wget https://get.symfony.com/cli/installer -O - | bash
|
2021-05-05 12:10:38 +02:00
|
|
|
|
2021-06-03 13:28:34 +02:00
|
|
|
COPY . /var/www/html/app/
|
2021-05-05 11:50:04 +02:00
|
|
|
|
2021-06-03 13:28:34 +02:00
|
|
|
WORKDIR /var/www/html/app
|
2021-05-05 12:33:28 +02:00
|
|
|
|
2021-05-06 15:46:34 +02:00
|
|
|
# Install stuff
|
2021-12-25 15:29:41 +01:00
|
|
|
RUN php ../composer.phar install
|
2021-05-05 12:33:28 +02:00
|
|
|
RUN yarn install && \
|
|
|
|
yarn build
|
|
|
|
|
2021-05-08 20:51:17 +02:00
|
|
|
RUN cp .env.staging .env
|
|
|
|
|
2021-05-06 15:46:34 +02:00
|
|
|
# Run Migration and dev-webserver
|
2021-12-25 15:11:29 +01:00
|
|
|
CMD /root/.symfony/bin/symfony console doctrine:migrations:migrate --no-interaction && /root/.symfony/bin/symfony serve --port=9999 --no-tls
|