Skip to content

Commit

Permalink
dev: add convenience copy-file bin and fix data path used by plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez committed Sep 12, 2021
1 parent 98f07f6 commit 4e6d797
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .devcontainer/20_init_plugin
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ main() {
# built in the Dockerfile
PLUGIN_NAME="$(source /tmp/.env && echo "$PLUGIN_NAME")"
PLUGIN_VARIABLE="$(source /tmp/.env && echo "$PLUGIN_VARIABLE")"
dokku config:set --global "${PLUGIN_VARIABLE}_HOST_ROOT=${SERVICE_HOST_ROOT}"
echo "export ${PLUGIN_VARIABLE}_HOST_ROOT=${SERVICE_HOST_ROOT}/$PLUGIN_NAME" > /etc/default/dokku
}

main "$@"
1 change: 1 addition & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ RUN apt-get install --no-install-recommends -y build-essential && \
ADD https://raw.githubusercontent.com/dokku/dokku/master/tests/dhparam.pem /mnt/dokku/etc/nginx/dhparam.pem

COPY .devcontainer/20_init_plugin /etc/my_init.d/20_init_plugin
COPY .devcontainer/bin/ /usr/local/bin/

COPY . .

Expand Down
8 changes: 8 additions & 0 deletions .devcontainer/bin/copy-file
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

main() {
PLUGIN_NAME="$(source /tmp/.env && echo "$PLUGIN_NAME")"
cp "$1" "/var/lib/dokku/plugins/enabled/$PLUGIN_NAME/$1"
}

main "$@"

0 comments on commit 4e6d797

Please sign in to comment.