This will install Mysql and phpmyadmin (including all dependencies to run Phpmyadmin) AND node.js
This receipe is for development - Node.js is run in using supervisor: changes to any file in the app will trigger a rebuild automatically.
For security, this receipe uses a .env file for credentials. A sample is provided in the env-sample file. If using these files for a fresh project, copy the env-sample file to a file called .env. Do NOT commit the changed .env file into your new project for security reasons (in the node package its included in .gitignore so you can't anyway)
In node.js, we use the MySQl2 packages (to avoid problems with MySQL8) and the dotenv package to read the environment variables.
Local files are mounted into the container using the 'volumes' directive in the docker-compose.yml for ease of development.
docker-compose up --build
For reference, see the video at: https://roehampton.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=6f290a6b-ba94-4729-9632-adcf00ac336e
NB if you are running this on your own computer rather than the azure labs that has been set up for you, you will need to install the following:
Useful commands:
Get a shell in any of the containers
docker exec -it <container name> bash -l
Once in the database container, you can get a MySQL CLI in the usual way
mysql -uroot -p<password>