initial commit
This commit is contained in:
commit
972575738d
|
@ -0,0 +1,3 @@
|
|||
TYPE=croc
|
||||
|
||||
SECRET_CROC_PASS_VERSION=v1
|
|
@ -0,0 +1,25 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
image: schollz/croc:master
|
||||
ports:
|
||||
- 9009-9013:9009-9013
|
||||
environment:
|
||||
- CROC_PASS_FILE=/run/secrets/croc_pass
|
||||
secrets:
|
||||
- croc_pass
|
||||
configs:
|
||||
- source: croc_entrypoint
|
||||
target: /abra-entrypoint.sh
|
||||
mode: 0555
|
||||
entrypoint: /abra-entrypoint.sh
|
||||
|
||||
secrets:
|
||||
croc_pass:
|
||||
name: ${STACK_NAME}_croc_pass_${SECRET_CROC_PASS_VERSION}
|
||||
external: true
|
||||
configs:
|
||||
croc_entrypoint:
|
||||
name: ${STACK_NAME}_croc_entrypoint_${CROC_ENTRYPOINT_VERSION}
|
||||
file: entrypoint.sh
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
if test -f "/run/secrets/croc_pass"; then
|
||||
pwd=`cat /run/secrets/croc_pass`
|
||||
if [ -z $pwd ]; then
|
||||
echo >&2 "error: /run/secrets/croc_pass is empty"
|
||||
exit 1
|
||||
fi
|
||||
export "CROC_PASS"="$pwd"
|
||||
unset "pwd"
|
||||
else
|
||||
echo >&2 "error: /run/secrets/croc_pass does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/croc-entrypoint.sh relay
|
Loading…
Reference in New Issue