update backend build
This commit is contained in:
+5
-3
@@ -10,20 +10,22 @@ ENV TIMEZONE=${TIMEZONE} \
|
|||||||
APP_ENV=prod \
|
APP_ENV=prod \
|
||||||
SCAN_CACHEABLE=(true)
|
SCAN_CACHEABLE=(true)
|
||||||
|
|
||||||
|
RUN apk add --no-cache php83-intl php83-pspell
|
||||||
|
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
php -v; php -m; php --ri swoole; \
|
php -v; php -m; php --ri swoole; \
|
||||||
cd /etc/php*; \
|
cd /etc/php*; \
|
||||||
{ \
|
{ \
|
||||||
echo "upload_max_filesize=128M"; \
|
echo "upload_max_filesize=128M"; \
|
||||||
echo "post_max_size=128M"; \
|
echo "post_max_size=128M"; \
|
||||||
echo "memory_limit=1G"; \
|
echo "memory_limit=2G"; \
|
||||||
echo "date.timezone=${TIMEZONE}"; \
|
echo "date.timezone=${TIMEZONE}"; \
|
||||||
} | tee conf.d/99_overrides.ini; \
|
} | tee conf.d/99_overrides.ini; \
|
||||||
ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime; \
|
ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime; \
|
||||||
echo "${TIMEZONE}" > /etc/timezone; \
|
echo "${TIMEZONE}" > /etc/timezone; \
|
||||||
rm -rf /var/cache/apk/* /tmp/* /usr/share/man
|
rm -rf /var/cache/apk/* /tmp/* /usr/share/man
|
||||||
|
|
||||||
WORKDIR /opt/www
|
WORKDIR /var/www
|
||||||
|
|
||||||
COPY composer.json composer.lock ./
|
COPY composer.json composer.lock ./
|
||||||
RUN composer install --no-dev --no-scripts --no-autoloader --prefer-dist --no-interaction
|
RUN composer install --no-dev --no-scripts --no-autoloader --prefer-dist --no-interaction
|
||||||
@@ -40,4 +42,4 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
|
|||||||
CMD wget -qO- http://127.0.0.1:9501/health || exit 1
|
CMD wget -qO- http://127.0.0.1:9501/health || exit 1
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||||
CMD ["php", "/opt/www/bin/hyperf.php", "start"]
|
CMD ["php", "/var/www/bin/hyperf.php", "start"]
|
||||||
|
|||||||
@@ -32,10 +32,10 @@ wait_tcp "${DB_HOST}" "${DB_PORT}" "postgres" "${WAIT_TIMEOUT}"
|
|||||||
wait_tcp "${AMQP_HOST}" "${AMQP_PORT}" "rabbitmq" "${WAIT_TIMEOUT}"
|
wait_tcp "${AMQP_HOST}" "${AMQP_PORT}" "rabbitmq" "${WAIT_TIMEOUT}"
|
||||||
|
|
||||||
echo "[entrypoint] running migrate --force"
|
echo "[entrypoint] running migrate --force"
|
||||||
php /opt/www/bin/hyperf.php migrate --force
|
php /var/www/bin/hyperf.php migrate --force
|
||||||
|
|
||||||
echo "[entrypoint] running app:install"
|
echo "[entrypoint] running app:install"
|
||||||
php /opt/www/bin/hyperf.php app:install
|
php /var/www/bin/hyperf.php app:install
|
||||||
|
|
||||||
echo "[entrypoint] handing off to: $*"
|
echo "[entrypoint] handing off to: $*"
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user