Hello guys, i have a problem with configuration laravel application under the docker and hosted on digital ocean.
I have a Dockerfile where i have defined necessary things and also ARG values.
# Dockerfile
# COPY ENV FILE
COPY ./.env.production .env
# Arguments
ARG DB_PASSWORD
# PRINT APPLICATION SECRETS TO .env
RUN echo "DB_PASSWORD=${DB_PASSWORD}\n"
i also have defined on digital ocean App-Level Environment Variables and after deploy everything is working fine, database connection etc, but then in routes/web.php i have defined endpoint for cron which trigger artisan command as i wrtie below.
Artisan::call('schedule:run');
but after cron access this endpoint i get an error "Access denied for user 'myuser'@'10.40.6.1' (using password: NO)" in log file and i don't really know why. I also tried to clear config cache, but this does not help me.
When i hardcode DB_PASSWORD to .env.production files everything will start work as expected.
Thanks for any help :)