This repository has been archived on 2024-10-16. You can view files and clone it, but cannot push or open issues or pull requests.
pflaenz.li-Symfony/Dockerfile

35 lines
1.3 KiB
Text
Raw Normal View History

2021-06-03 13:28:56 +02:00
FROM php:8.0.6-fpm-buster
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');" && \
php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
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-05-05 12:33:28 +02:00
RUN php ../composer.phar update
RUN yarn install && \
yarn build
2021-06-17 17:25:35 +02:00
# Pull translation
RUN php bin/console translation:pull loco --locales=en
RUN php bin/console translation:pull loco --locales=de
RUN cp .env.staging .env
2021-05-06 15:46:34 +02:00
# Run Migration and dev-webserver
2021-05-05 12:33:28 +02:00
CMD /root/.symfony/bin/symfony console doctrine:migrations:migrate && /root/.symfony/bin/symfony serve --port=9999 --no-tls