diff --git a/README.md b/README.md index 4f0674f..11919ee 100644 --- a/README.md +++ b/README.md @@ -67,3 +67,20 @@ $ gmg --conf_file /app/mediagoblin_local.ini makeadmin username ``` Where `username` corresponds to the user you added above. + + +## Local development + +To build the image locally, run: + +```console +scripts/build +``` + +And then to run the image: + +```console +scripts/dev +``` + +Connect to http://localhost:8080 to view the running instance in your browser. diff --git a/scripts/dev b/scripts/dev new file mode 100755 index 0000000..2898f9a --- /dev/null +++ b/scripts/dev @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +USER_PODMAN_SOCKET_PATH=/run/user/$UID/podman/podman.sock + +if [ -e "$USER_PODMAN_SOCKET_PATH" ]; then + export DOCKER_HOST="unix://$USER_PODMAN_SOCKET_PATH" +fi + +docker-compose --file dev-compose.yml up