Originally created by: stevenmhunt
I added a Dockerfile to OpenGRC which uses SQLite persistence and HTTP on port 80 running on Apache. You can set the following environment variables using the -e <name>=<value> flag in docker run:
APP_ENV - default: localAPP_DEBUG - default: false, set to true to see detailed error screens.DB_CONNECTION - default: "sqlite", can be set to "mysql" for a MySQL database.DB_HOST - default: "localhost"DB_PORT - default: "", can be set to "3306" for a MySQL database.DB_DATABASE - default: "/var/www/html/storage/opengrc.sqlite", the database name ("opengrc" for MySQL)DB_USERNAME - default: "", the database user name.DB_PASSWORD - default: "", the database password.To run the build, use composer run-script docker-build.
Also note that I changed AppServiceProvider to force HTTPS if the app environment is not local. This allows the Docker container to run using HTTP and then handle SSL at a different layer of infrastructure. With the addition of a few more environment variables, it also should be possible to allow the container itself to run HTTPS.
Ticket changed by: LeeMangold