#!/bin/sh
NAME='penpot'
YAML="root/${NAME}.yaml"
DockerFind()
{
local i j match
for i in $(docker ps | tail -n +2 | sed -e 's/.* //'); do
Msg "Check: $i"
match=1
for j in "$@"; do
[ "$i" = "${i#*$j}" ] && { match=0; Err "Fail on $j"; }
done
[ $match -ne 0 ] && { OUT="$i"; return 0; }
done
return 1
}
Msg() { echo "$@" >&2; }
Err() { Msg "*** $@ ***"; }
case "$1" in
'stop'|'quit'|'down')
docker-compose -p penpot -f docker-compose.yaml down
;;
'update')
docker-compose -f "$YAML" pull
;;
'user'|'add-user')
DockerFind "$NAME" 'backend' && \
docker exec -ti "$OUT" python3 manage.py create-profile || \
Err "$NAME backend not found running"
;;
*)
mkdir -p 'root'
[ ! -e "$YAML" ] && \
curl -o "$YAML" https://raw.githubusercontent.com/penpot/penpot/main/docker/images/docker-compose.yaml
# Currently running
docker ps
# Start it
docker-compose -p penpot -f "$YAML" up
;;
esac
Can not login after adding user - get the error shown. I’m sure it’s me not you.