Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3db224efeb | ||
|
|
c20230876b | ||
|
|
f157e6e820 | ||
|
|
0fd24e601a | ||
|
|
09a3bd0c91 | ||
|
|
f82c308dd5 |
17
bootstrap.sh
17
bootstrap.sh
@@ -62,8 +62,13 @@ create-shokku-app() {
|
||||
echo "==> deploying"
|
||||
dokku config:unset shokku DOKKU_SKIP_DEPLOY &>/dev/null
|
||||
|
||||
echo "==> enabling letsencrypt"
|
||||
dokku letsencrypt:enable shokku &>/dev/null
|
||||
if [ -z "$SHOKKU_CERT" ]; then
|
||||
echo "==> enabling letsencrypt"
|
||||
dokku letsencrypt:enable shokku &>/dev/null
|
||||
else
|
||||
echo "==> adding certificate from SHOKKU_CERT"
|
||||
dokku certs:add shokku < "$SHOKKU_CERT"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
@@ -77,9 +82,11 @@ main() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! dokku plugin:installed letsencrypt; then
|
||||
echo "Please setup letsencrypt using the instructions at https://dokku.com/docs/deployment/application-deployment/#setting-up-ssl" 1>&2
|
||||
exit 1
|
||||
if [ -z "$SHOKKU_CERT" ]; then
|
||||
if ! dokku plugin:installed letsencrypt; then
|
||||
echo "Please setup letsencrypt using the instructions at https://dokku.com/docs/deployment/application-deployment/#setting-up-ssl" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
for plugin in redis postgres mongo mysql; do
|
||||
|
||||
@@ -107,7 +107,7 @@ func GetServiceInfo(e *env.Env, c echo.Context) error {
|
||||
}
|
||||
|
||||
info := map[string]string{
|
||||
"version": "", "internal-ip": "", "status": "", // "dsn": "",
|
||||
"internal-ip": "", "status": "", // "dsn": "",
|
||||
}
|
||||
for key := range info {
|
||||
cmd := fmt.Sprintf("%s:info %s --%s", req.Type, req.Name, key)
|
||||
|
||||
@@ -42,8 +42,8 @@ func NewRequestValidator() *requestValidator {
|
||||
if err != nil {
|
||||
log.Fatal().Err(err).Msg("failed to register validator")
|
||||
}
|
||||
v.RegisterAlias("appName", "appNameChars,min=4,max=32")
|
||||
v.RegisterAlias("processName", "appNameChars,min=2,max=32")
|
||||
v.RegisterAlias("appName", "appNameChars,min=1,max=32")
|
||||
v.RegisterAlias("processName", "appNameChars,min=1,max=32")
|
||||
|
||||
return &requestValidator{validator: v}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user