-
Notifications
You must be signed in to change notification settings - Fork 1
/
robo.yml
35 lines (29 loc) · 1.09 KB
/
robo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
dockerize:
summary: build the plooral container
exec: docker build -t jenpet/plooral:latest -f=ci/Dockerfile .
kickstart:
summary: starts the plooral app and all dependencies for local development
exec: docker compose up -d --force-recreate
cmd:
summary: >-
runs a command within one of the development docker containers 'ui' or 'api'.
Example: robo ui "npm i"
command: |
if [ "${1}" != "ui" ] && [ "${1}" != "api" ]; then
echo "Invalid container selection. Allowed containers are 'ui' and 'api'."
exit 1
fi
if [ -z "${2}" ]; then
echo "Missing command which can be forwarded to container."
exit 1
fi
# use hardcoded container names since docker formatting via templating is not possible due to hugo
# has to be replaced as soon as variable replacement is not that greedy.
CONTAINER=plooral_${1}_1
docker ps | grep ${CONTAINER} > /dev/null
if [ $? != 0 ]; then
echo "Could not find plooral development container of type '${1}'"
exit 1
fi
# run the actual command
docker exec ${CONTAINER} /bin/sh -c "${2}"