I tried to setup symfony with docker for the MySQl database. Unfortunatley I havent get it to work corretly. The MySQL database is not runnning corretly and PHP is dependeds on it, so it chrashes when it cant find the database.
Currently I am trying out an image that contains: PHP & Caddy
image: ghcr.io/eventpoints/php:main
github : https://github.com/eventpoints/docker-base-images
When starting up the docker-container,
several warnings appear in the docker containers of the database (mysql) and php
container mysql warnings:
- root@localhost is created with an empty password ! Please consider switching off the –initialize-insecure option.
- CA certificate ca.pem is self signed.
- Insecure configuration for –pid-file: Location ‘/var/run/mysqld’ in the path is accessible to all OS users. Consider choosing a different directory
container PHP message:
- The database is not up or not reachable
Maybe someone kindly could advice how I could get symfony and mysql to work coherently with mysql.
Repo:
github.com/Ted-bot/backend_ma
docker container mysql database
docker container php
I tried reading sevaral forms but could find a fitting answer for my issue.
Then tried looking within the app if I could configure some way and make it work but unfortunatley I could get it done.