I have a small application in laravel 11, with MySQL database, I have uploaded and tried to connect the database, but I have only been able to deploy and see a maximum error 500, I have not been able to deploy it completely because if I make basic changes such as installation of extensions and others, the deployment fails later, I try with environment variables but it does not work either, I'm looking for help here waiting for someone to give me a guide to the possible problem attached my Dockerfile configuration:
DESDE php:8.2-fpm-alpine
RUN apk add --no-cache nginx wget php8-pdo_mysql
RUN mkdir -p /run/nginx
COPY docker/nginx.conf /etc/nginx/nginx.conf
RUN mkdir -p /app
COPY . /app
COPIAR ./src /app
RUN sh -c "wget http://getcomposer.org/composer.phar && chmod a+x composer.phar && mv composer.phar /usr/local/bin/composer"
RUN cd /app && \
/usr/local/bin/composer install --no-dev
RUN chown -R www-data: /app
CMD sh /app/docker/startup.sh