35 lines
No EOL
1.4 KiB
Docker
35 lines
No EOL
1.4 KiB
Docker
FROM php:8.0.6-fpm-buster
|
|
|
|
# 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') === '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');"
|
|
|
|
# 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
|
|
RUN yarn install && \
|
|
yarn build
|
|
|
|
# Pull translation
|
|
RUN curl "https://localise.biz/api/export/locale/en.yml?key=RCrByb141Z9P3QjMhWgHrqRrdxu9x-Rro&format=symfony" > translations/messages.en.yml
|
|
RUN curl "https://localise.biz/api/export/locale/de.yml?key=RCrByb141Z9P3QjMhWgHrqRrdxu9x-Rro&format=symfony" > translations/messages.de.yml
|
|
|
|
RUN cp .env.staging .env
|
|
|
|
# Run Migration and dev-webserver
|
|
CMD /root/.symfony/bin/symfony console doctrine:migrations:migrate && /root/.symfony/bin/symfony serve --port=9999 --no-tls |