Hi all, I am having problems configuring my laravel 10 plus docker application, right now when I try to access localhost:9090 I get the error:
No application encryption key has been specified
I share with you the configuration files in case you can help me, thanks in advance
.env
APP_NAME=administrative-management-email-integration-api-with-php
APP_ENV=local
APP_KEY=base64:SM8OOrDyemHGO0qZznVesr6JyEoFwD2fwK7actoS+/M=
APP_PORT=9090
APP_ECHO_PORT=6001
APP_DEBUG=true
APP_URL=http://localhost:${APP_PORT}
APP_NETWORK=${APP_NAME}-aiudo
php.dockerfile
FROM php:8.1-fpm
# Arguments defined in docker-compose.yml
ARG user
ARG uid
# Install dependencies
RUN apt-get update && apt-get install -qy git curl zip libmcrypt-dev unzip libfreetype6-dev libjpeg62-turbo-dev libpng-dev libzip-dev zlib1g-dev
# Configure and install extensions
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-configure pcntl --enable-pcntl
RUN docker-php-ext-install -j$(nproc) pdo_mysql sockets gd pcntl exif ctype bcmath zip
RUN docker-php-ext-enable zip
# Install Redis extension
RUN pecl install redis \
&& docker-php-ext-enable redis
# Activate shell
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Create system user to run Composer and Artisan Commands
RUN useradd -G www-data,root -u $uid -d /home/$user $user
RUN mkdir -p /home/$user/.composer && \
chown -R $user:$user /home/$user
RUN chown -R $user:$user /var/www
# Set working directory \
WORKDIR /var/www
composer.json
"require": {
"php": "^8.1",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.3",
"laravel/tinker": "^2.8"
},