A coding challenge for veganhacktivists.org. Based on docker-compose-laravel.
To get started, make sure you have Docker installed on your system, and then clone this repository.
- First edit your
src/.env
file after copying thesrc/.env.example
file. - Build the Docker image with
docker-compose build
- Run
bin/composer install
to install the composer packages. - Run
bin/artisan migrate
to install the databases. - Run
bin/artisan key:generate
to generate the keys. - Then run
docker-compose up -d
to spin up the project.
Open up your browser of choice to http://localhost:8080 and you should see your Laravel app running as intended.
Run bin/artisan test
to run the tests.
By default, whenever you bring down the docker-compose network, your MySQL data will be removed after the containers are destroyed. If you would like to have persistent data that remains after bringing containers down and back up, do the following:
- Create a
mysql
folder in the project root, alongside thenginx
andsrc
folders. - Under the mysql service in your
docker-compose.yml
file, add the following lines:
volumes:
- ./mysql:/var/lib/mysql