mostafaznv / nova-ckeditor

CkEditor 5 Field for Laravel Nova with Media & Snippet Browsers
https://mostafaznv.gitbook.io/nova-ckeditor/
MIT License
50 stars 21 forks source link

Can't display at github action push docker hub environment #76

Closed KenHuangisGood closed 1 year ago

KenHuangisGood commented 1 year ago

When I use docker build image and run on local environment, that can work.

but when use GitHub Actions, will show this error.

<form-ckeditor index="4" errors="[object Object]" resource-id="26" resource-name="announcements" field="[object Object]" via-resource="" via-resource-id="" via-relationship="" shown-via-new-relation-modal="false" form-unique-id="4lmd4tmjo4s" mode="form" show-help-text="true"></form-ckeditor>

I've tested not using GitHub Actions and instead used the 'docker pull' command to fetch my image from Docker Hub. At this point, CKEditor is operational.

This is my Dockerfile

FROM php:8.2.0-cli

RUN apt-get update && \
    apt-get install -y \
    vim -y \
    libzip-dev \
    zip \
    libpng-dev \
    libjpeg62-turbo-dev \
    libfreetype6-dev \
    libwebp-dev \
    libssl-dev -y \
    openssl -y\
    wget -y \
    git -y \
    procps -y \
    htop -y \
    libcurl4-openssl-dev \
    && apt-get clean

# install Swoole
RUN cd /tmp && git clone https://github.com/openswoole/ext-openswoole.git && \
    cd ext-openswoole && \
    git checkout v22.0.0 && \
    phpize && \
    ./configure --enable-openssl --enable-hook-curl --enable-http2 --enable-mysqlnd && \
    make && make install

RUN touch /usr/local/etc/php/conf.d/openswoole.ini && \
    echo 'extension=openswoole.so' > /usr/local/etc/php/conf.d/zzz_openswoole.ini

RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64
RUN chmod +x /usr/local/bin/dumb-init

RUN apt-get autoremove -y && rm -rf /var/lib/apt/lists/*

RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp && \
    docker-php-ext-install pdo_mysql zip exif gd pcntl

COPY . /var/www/html

WORKDIR /var/www/html

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
    && composer install \
    && chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache \
    && php artisan storage:link

CMD ["php", "artisan", "octane:start", "--host=0.0.0.0", "--port=8000"]
KenHuangisGood commented 1 year ago

I understand the issue now. It might be because the .dockerignore file doesn't include the "vendor" directory, and instead, it's being uploaded directly.

mostafaznv commented 1 year ago

thank you for sharing the result ❤️