Want to contribute to the codebase of Open Police Complaints (OPC)? This tutorial shows you how to do it with Docker. OPC is a new public service that helps you prepare, file, and track reports of police misconduct.
This Tutorial: https://openpolice.org/how-to-install-open-police-complaints-with-docker
Welcome to this tutorial video on how to install your own copy of Open Police Complaints (OPC) for software development. This is Morgan Lesko, OPC’s robot guy and co-creator, and I would love for you to help the coding effort on this project to make it ever stronger.
First you’ll need to check out Docker.com to download and install Docker for your desktop, or on your server. Here I’m showing how to reset your Docker installation to factory settings (on Mac). This is useful if you’re struggling to learn Docker and need to start fresh, perhaps again and again. * cough *
Once Docker is installed, we’re ready for Laradock, which you can learn more about at laradock.io. It is well known in the Laravel community because it “includes pre-packaged Docker Images, all pre-configured to provide a wonderful PHP development environment.”
Expect the first Laradock boot to take up to 15 minutes, so pause this video and stretch. Or go to Laravel.com to learn more about the PHP framework used by OPC.
If nothing goes wrong with Docker, you don’t need to learn much about it to help with OPC. But some basic Laravel orientation, like on Laracasts.com, can provide important context for working on OPC.
To prep the stage, we can use Git to clone the latest Laravel and Laradock packages. Then initialize Laradock’s environment file. And now we’re going to boot up all of Laradock’s containers for the first time.
OK, See you in a few.
Welcome back, and if the Laradock install went smoothly, let’s move forward.
We will enter the Docker container created by Laradock named “mysql”, and quickly apply a fix for something funky with the latest blend of versions. Then exit out of that container.
At this point, you can optionally browse to http://localhost:8080 for PhpMyAdmin. Enter the server as ‘mysql’, username as ‘default’, password as ‘secret’
We will enter the Docker container created by Laradock named “workspace”. Then clone the docker-openpolice repository from GitHub, give the bash script permissions to run, and run our installation script.
This script should install Laravel, OPC, and all its dependencies. It should take about half as long a wait as the first Laradock boot up, and I’ve laid out the screen here so you can see some of the installation’s results.
OK, you should pause the video again until your robot has finished.
Welcome back again, and if the Open Police install script didn’t throw a bunch of red errors, then let’s move forward. At this point, browsing to localhost as a URL should bring up the site template of OpenPolice.org, and a signup form to create your first Admin User account in your local system.
Now your installation has been initiated and you can browse back to the home page, click the button to Share Your Story, and test out the process of filing a complaint. While logged in, you can also click the Dashboard link in the top-right corner to start poking around the Admin Areas.
When possible, I will be make more videos to review each area of the site, and the codebase. But I hope you’ve had success in creating your own copy of Open Police Complaints, and I look forward any nuggets of brilliance you’ll be able to share for this effort.
Please let me know if you hit any roadblocks along the way, or have any constructive criticism. And thank you so much, for helping to make Open Police Complaints even stronger!
Disclosure of Material Connection: Some of the links in the
post above are “affiliate links.” This means if you click on the link and
purchase the item, I will receive an affiliate commission. Regardless, I only
recommend products or services I use personally and believe will add value to my
readers. I am disclosing this in accordance with the Federal Trade Commission’s
16 CFR, Part 255: “Guides Concerning the Use of Endorsements and
Testimonials in Advertising.”