2022-07-05 23:17:26 +00:00
|
|
|
# https://github.com/roadrunner-server/roadrunner/pkgs/container/roadrunner
|
|
|
|
FROM ghcr.io/roadrunner-server/roadrunner:latest AS roadrunner
|
|
|
|
FROM php:8.1-alpine
|
2019-12-27 22:20:39 +00:00
|
|
|
|
|
|
|
ENV PHP_TIMEZONE Europe/Moscow
|
2022-07-05 23:17:26 +00:00
|
|
|
ENV APP_ENV=prod
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY --from=roadrunner /usr/bin/rr /app/bin/rr
|
|
|
|
COPY . /app/
|
2019-12-27 22:20:39 +00:00
|
|
|
|
|
|
|
RUN apk update && \
|
2022-07-05 23:17:26 +00:00
|
|
|
apk add autoconf build-base icu libpq postgresql-dev && \
|
2022-07-03 22:25:46 +00:00
|
|
|
docker-php-ext-configure intl && \
|
2019-12-27 22:20:39 +00:00
|
|
|
docker-php-ext-configure pdo_pgsql && \
|
2022-07-05 23:17:26 +00:00
|
|
|
docker-php-ext-configure sockets && \
|
|
|
|
docker-php-ext-install -j$(nproc) intl && \
|
2019-12-27 22:20:39 +00:00
|
|
|
docker-php-ext-install -j$(nproc) pdo_pgsql && \
|
2022-07-05 23:17:26 +00:00
|
|
|
docker-php-ext-install -j$(nproc) sockets && \
|
2022-07-05 23:54:52 +00:00
|
|
|
pecl install igbinary-3.2.7 && \
|
2022-07-03 22:25:46 +00:00
|
|
|
pecl install redis-5.3.7 && \
|
2022-07-05 23:54:52 +00:00
|
|
|
docker-php-ext-enable igbinary && \
|
2022-07-05 23:17:26 +00:00
|
|
|
docker-php-ext-enable intl && \
|
|
|
|
docker-php-ext-enable pdo_pgsql && \
|
2022-07-03 22:25:46 +00:00
|
|
|
docker-php-ext-enable redis && \
|
2022-07-05 23:17:26 +00:00
|
|
|
apk del autoconf build-base postgresql-dev && \
|
2019-12-27 22:20:39 +00:00
|
|
|
mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" && \
|
2022-07-05 23:17:26 +00:00
|
|
|
echo "date.timezone = $PHP_TIMEZONE" > $PHP_INI_DIR/conf.d/timezone.ini && \
|
|
|
|
mkdir -p /usr/local/bin && \
|
|
|
|
wget -O /usr/local/bin/composer https://getcomposer.org/download/latest-stable/composer.phar && \
|
|
|
|
chmod +x /usr/local/bin/composer && \
|
|
|
|
ls -la /app && ls -la /app/bin && \
|
|
|
|
chmod +x /app/bin/console && \
|
|
|
|
/usr/local/bin/composer install --no-dev --no-progress --no-interaction --optimize-autoloader
|
|
|
|
|
2022-07-10 16:55:59 +00:00
|
|
|
EXPOSE 80/tcp
|
|
|
|
|
2022-07-05 23:17:26 +00:00
|
|
|
VOLUME /var/log
|
|
|
|
|
|
|
|
CMD ["/app/bin/rr", "serve"]
|