this my problem can check the page , https://www.elfanak.com/en_US/cravate.html
cant see the products
thanks for helping
sudo magento-cli cache:clean
sudo magento-cli setup:static-content:deploy -f
sudo magento-cli indexer:reindex
just with the link to your page i can't figure out the problem go to var/log and see exception and system or go to developer mode to see the error.
Do this first
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush
find app/code var/view_preprocessed vendor pub/static app/etc generated/code generated/metadata ( -type f -or -type d ) -exec chmod u-w {} + && chmod o-rwx app/etc/env.php
chmod u+x bin/magento
Related
I am using this script to create a new Laravel project:
https://laravel.build/example
However, Laravel 9.* is installed by default.
How do I change the script to install Laravel 8 ?
I tried inserting versions these three places: "laravel new 'version'", "laravel new example 'version'" and "laravelsail/php81-composer:'version'"
You can modify the script replacing the
laravel new example-app
by the command from #Yug
composer create-project laravel/laravel example-app 8.0
installing laravel/sail:
composer require laravel/sail
and change docker image to
laravelsail/php74-composer
In the end the final script will be like:
docker info > /dev/null 2>&1
# Ensure that Docker is running...
if [ $? -ne 0 ]; then
echo "Docker is not running."
exit 1
fi
docker run --rm \
-v "$(pwd)":/opt \
-w /opt \
laravelsail/php74-composer:latest \
bash -c "composer create-project laravel/laravel example-app 8.0 && cd example-app && composer require laravel/sail && php ./artisan sail:install --with=mysql,redis,meilisearch,mailhog,selenium "
cd example-app
CYAN='\033[0;36m'
LIGHT_CYAN='\033[1;36m'
WHITE='\033[1;37m'
NC='\033[0m'
echo ""
if sudo -n true 2>/dev/null; then
sudo chown -R $USER: .
echo -e "${WHITE}Get started with:${NC} cd example-app && ./vendor/bin/sail up"
else
echo -e "${WHITE}Please provide your password so we can make some final adjustments to your application's permissions.${NC}"
echo ""
sudo chown -R $USER: .
echo ""
echo -e "${WHITE}Thank you! We hope you build something incredible. Dive in with:${NC} cd example-app && ./vendor/bin/sail up"
fi
Run this command to install an old version of Laravel
composer create-project laravel/laravel name_projet 8.0
composer self-update
composer update --no-scripts
Hello I have enabling the cron feature for Laravel on Ubuntu 18.10 on Vultr VPS server.
I have added the cron task to the cron jobs list using the command
crontab -e
Then I have added the command listed in the laravel documentation
* * * * * cd /var/www/html/hva && php artisan schedule:run >> /dev/null 2>&1
I have made sure that cron is running and I can see that the task is running if I run
sudo grep -i cron /var/log/syslog|tail -3
Which returns
May 20 20:56:01 HiRe-Pro-Web CRON[1819]: (root) CMD (cd /var/www/html/hva && php artisan schedule:run >> /dev/null 2>&1)
May 20 20:57:01 HiRe-Pro-Web CRON[1862]: (root) CMD (cd /var/www/html/hva && php artisan schedule:run >> /dev/null 2>&1)
May 20 20:58:01 HiRe-Pro-Web CRON[1898]: (root) CMD (cd /var/www/html/hva && php artisan schedule:run >> /dev/null 2>&1)
Does anyone have any suggestions where I'm going wrong here.
I have a Laravel / VueJS app that I am trying to dockerize.
At the end of the Dockerfile, I have
CMD php artisan serve --host=0.0.0.0 --port=80
my docker-compose:
version: '3'
services:
app:
image: xoco/kendozone:local-1.0.1
ports:
- "8181:80"
When I run:
docker-compose up
I get:
Recreating local_app_1 ... done
Attaching to local_app_1
app_1 | [03-May-2018 18:20:21] NOTICE: fpm is running, pid 1
app_1 | [03-May-2018 18:20:21] NOTICE: ready to handle connections
that seems to be ok
But when I try to access it on
localhost:8181
I get a ERR_EMPTY_RESPONSE
Any idea how to fix it ?
EDIT: Add Dockerfile
FROM php:7.2-fpm
LABEL version="1.0.0"
ENV node_version 8.4.0
ENV npm_version 5.7.1
ENV NVM_DIR /.nvm
ENV APP_DIR="/var/www"
ENV APP_PORT="80"
ENV DOCKER_FOLDER="docker/local"
RUN echo "deb http://ftp.de.debian.org/debian stretch main " >> /etc/apt/sources.list \
&& apt-get update -y
RUN apt-get install -y openssl zip unzip git gcc make automake \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libmagickwand-dev vim --no-install-recommends
RUN apt-get purge --auto-remove -y g++ \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install pdo pdo_mysql mbstring zip -j$(nproc) iconv -j$(nproc) gd
WORKDIR $APP_DIR
COPY . $APP_DIR
RUN mkdir -p $APP_DIR/resources/assets/less/_main_full \
&& touch $APP_DIR/resources/assets/less/_main_full/main.less \
&& touch $APP_DIR/database/sqlite.db \
&& mv $DOCKER_FOLDER/.env.local .env \
&& chown -R www-data:www-data $APP_DIR
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN composer install --no-interaction
RUN mkdir -p $NVM_DIR && chown -R www-data:www-data $NVM_DIR
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash \
&& [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" \
&& nvm install ${node_version}
ENV NODE_PATH $NVM_DIR/v$node_version/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$node_version/bin:$PATH
RUN npm install --save-exact imagemin-pngquant#5.0.*
RUN npm install
RUN npm run production
RUN php artisan key:generate
RUN php artisan migrate --seed
CMD php artisan serve --host=0.0.0.0 --port=$APP_PORT
I have a container with for my laravel app with php:7.0.4-fpm as base image.
This is my dockerfile :
FROM php:7.0.4-fpm
RUN apt-get update && apt-get install -y cron nano libmcrypt-dev \
mysql-client libmagickwand-dev --no-install-recommends \
&& pecl install imagick \
&& docker-php-ext-enable imagick \
&& docker-php-ext-install mcrypt pdo_mysql
COPY . /var/www
ADD crontab /etc/cron.d/laravel-cron
RUN chmod 0644 /etc/cron.d/laravel-cron
RUN touch /var/log/cron.log
RUN /usr/bin/crontab /etc/cron.d/laravel-cron
RUN cron
Cron is not running, I have to ssh in the container to launch it.
When I start it manually it works for som simple things like echoing a text every minute. But not for the php artisan schedule:run command. In the log I see :
Running scheduled command: '/usr/local/bin/php' 'artisan'
errors:insert > '/dev/null' 2>&1
errors:insert is the name of my task, but nothing is update in the website.
That's strange because when I run php artisan schedule:run command manually it works on the website.
So my question is : How to make cron work on a docker container to execute the php artisan schedule:run command ? Preferably written in a dockerfile and not manually via ssh.
I also have a strange message from the container :
ALERT: oops, unknown child (5094) exited with code 1.
Please open a bug report (https://bugs.php.net).
An alternative solution could be by running php artisan schedule:run with supervisor. In my case I have a schedule-run.conf in [project root]/.docker/php/workers:
[program:schedule-run]
process_name=%(program_name)s_%(process_num)02d
command=/bin/bash -c "while [ true ]; do (php /var/www/html/artisan
schedule:run --verbose --no-interaction &); sleep 60; done"
autostart=true
autorestart=true
user=root
numprocs=1
redirect_stderr=true
stdout_logfile=/var/www/html/storage/logs/schedule.log
stopwaitsecs=60
replace your apt-get install -y cron by apt-get install -y supervisor
add ADD .docker/php/workers /etc/supervisor/conf.d and CMD ["/usr/bin/supervisord"] to your Dockerfile.
Though this is a late reply but I thought my solution might help others as I have faced this issue before.
I created separate docker container as Laravel Docker Cron for performing laravel schedules
Here my Dockerfile code
FROM ubuntu:latest
MAINTAINER docker#ekito.fr
ENV DEBIAN_FRONTEND=noninteractive
# install base packages
RUN apt-get update && apt-get -y install cron\
apt-utils \
curl \
# Install php 7.2
php7.2 \
php7.2-cli \
php7.2-json \
php7.2-curl \
php7.2-fpm \
php7.2-dev \
php7.2-gd \
php7.2-ldap \
php7.2-mbstring \
php7.2-bcmath \
php7.2-mysql \
php7.2-soap \
php7.2-sqlite3 \
php7.2-xml \
php7.2-zip \
php7.2-intl \
libldap2-dev \
libaio1 \
libaio-dev
# Install tools
RUN apt-get -y install openssl \
nano \
ghostscript \
iputils-ping \
locales \
rlwrap \
php-pear \
make \
unzip \
zip \
tar \
ca-certificates \
&& apt-get clean &&\
# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Set locales
RUN locale-gen en_US.UTF-8 en_GB.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 km_KH sv_SE.UTF-8 fi_FI.UTF-8
# Copy crontab file to the cron.d directory
COPY crontab /etc/cron.d/crontab
# Give execution rights on the cron job
RUN chmod 0644 /etc/cron.d/crontab
# Apply cron job
RUN crontab /etc/cron.d/crontab
# Create the log file to be able to run tail
RUN touch /var/log/cron.log
# Run the command on container startup
CMD cron && tail -f /var/log/cron.log
crontab file will contain
* * * * * cd /var/www && php artisan schedule:run >> /var/log/cron.log 2>&1
# An empty line is required at the end of this file for a valid cron file.
Here is repo for this code click here
I'm using oh-my-zsh a have the following alias in .zshrc:
alias composer="php -d memory_limit=-1 $(which composer)"
I get the following output:
$ composer
Could not open input file: composer:
And for:
$ which composer
composer: aliased to php -d memory_limit=-1 composer: aliased to php -d memory_limit=-1 composer: aliased to php -d memory_limit=-1 /usr/local/bin/composer
$ zsh --version
zsh 5.2 (x86_64-apple-darwin15.4.0)
Under Linux it works as expected:
$ which composer
composer: aliased to php -d memory_limit=-1 /usr/bin/composer
$ zsh --version
zsh 5.3.1 (x86_64-unknown-linux-gnu)
This has nothing to do with it being on OS X or Linux, or the usage of screen. It very much looks like you ran the command
alias composer="php -d memory_limit=-1 $(which composer)"
multiple times. which lead to the recursive definition of composer:
composer: aliased to php -d memory_limit=-1 composer: aliased to php -d memory_limit=-1 composer: aliased to php -d memory_limit=-1 /usr/local/bin/composer
Adding line-breaks to make it obvious:
composer: aliased to php -d memory_limit=-1 \
composer: aliased to php -d memory_limit=-1 \
composer: aliased to php -d memory_limit=-1 \
/usr/local/bin/composer
While the first use of which composer will return /usr/local/bin/composer (or a similar path), subsequent uses will return composer: aliased to .... This leads to the error message that the input file composer: (Note the colon) could not be found.
Defining the alias just once will probably work for the most part, but to be safe you can tell which explicitly to look for paths (ignoring builtins, aliases and functions) with the parameter -p:
alias composer="php -d memory_limit=-1 $(which -p composer)"
It was an issue with GNU screen session. Creating a new screen window the alias works as expected.