Add local dev script.

This commit is contained in:
Dan Helfman 2023-04-10 22:36:50 -07:00
parent 08981df8ca
commit 2510f25daa
2 changed files with 28 additions and 0 deletions

View File

@ -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.

11
scripts/dev Executable file
View File

@ -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