Havent used Laravel in a few months, so spinning this up for fun :)/
From project root level:
- Copy and configure /env/.env.example to /env/.env (ensure all passwords are strong and filled in)
- Run
docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q)
to stop all currently running containers - Run
docker-compose up -d --build
t build the docker stack - Visit http://localhost
Run this command at the project root.
- Run
docker-compose down
- The HTTP auth username and password is 'test:test', and can be changed in
/nginx/conf/.htpasswd
. I just added this as i also use this on a droplet. - If you need to change the name of public/ amend the /docker-compose.yml
There is a phpMyAdmin container running to give you a database management. This can be accessed from http://localhost:8080
The database is stored in your users directory ~/dbs
, more specifically laravel/data/mariadb
as i am using this in a local VM, and to prevent issues with mounted volume performance with databases.
Credentials are stored /env/.env
.
- The app code should be placed in
/app
- The nginx public serving directory should be in
/app/public
- Refer to the Docker docs for more about commands https://docs.docker.com/engine/reference/commandline/cli/
- For docker-compose commands refer to https://docs.docker.com/compose/reference/
Paul Stewart