Open farukshin opened 5 years ago
The APP_KEY format is laravel specific with the following format: "base64:yourkey="
You can generate one with the following command:
php artisan key:generate --show
or if you don't have laravel installed:
echo "base64:$(pwgen 43 1)="
Note that pwgen needs to be installed.
Sequencing:
git clone https://github.com/cachethq/Docker.git cachet-docker
cd cachet-docker
LATEST_TAG=$(git tag -l | grep -i '^v' | sort | tail -n 1)
git checkout $LATEST_TAG
docker-compose build
docker-compose up -d
sleep 5
docker exec -i cachetdocker_cachet_1 php artisan key:generate
docker exec -i cachetdocker_cachet_1 php artisan app:install
for start
docker-compose up -d
for stop
docker-compose down
In the end I get 502 Bad Gateway http://localhost
Here is what worked for me - After I ran php artisan key:generate, check if you have APP_KEY generated in .env file.
If you see the value, copy it and add it in /var/www/html/config/app.php as shown below
'key' => '<your-key-from-env-file>',
Starts with base64:something-something.
Now stop the containers and start those again. Your error should be solve.
@farukshin To really get the latest version git tag -l | grep -i '^v' | sort | tail -n 1
should be git tag -l | grep -i '^v' | sort -V | tail -n 1
Otherwise the version is v2.3.9 at the moment.
@jannemann thank. Indeed, it launched an outdated version. Now starting like this:
git clone https://github.com/cachethq/Docker.git cachet-docker
cd cachet-docker
LATEST_TAG=$(git tag -l | grep -i '^v' | sort -V | tail -n 1)
echo 'LATEST_TAG '$LATEST_TAG
git checkout $LATEST_TAG
docker-compose build
docker-compose up -d
sleep 5
docker exec -i cachet-docker_cachet_1 php artisan key:generate
docker exec -i cachet-docker_cachet_1 php artisan app:install
As a result, I still get an error of 500.
sequencing
in file docker-compose.yml changed environment variables
- APP_KEY=SomeRandomString
Build and run the image
I end up with a 500 error. How to run the service correctly?