You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

86 lines
2.4 KiB

# -*- mode: shell-script -*-
GOGOCARTO_CODE="$SERVICE_CONFIGSTORE/opt/apps/gogocarto"
GOGOCARTO_RELEASE=3.1.3-2-gf3c10f1
GOGOCARTO_URL=https://docker.0k.io/downloads/gogocarto-"${GOGOCARTO_RELEASE}".tar.bz2
gogocarto:init() {
mkdir -p "${GOGOCARTO_CODE}" &&
cd "${GOGOCARTO_CODE}" &&
curl "$GOGOCARTO_URL" | tar xjv
}
gogocarto:config() {
APP_ENV=$(options-get app-env 2>/dev/null) || true
APP_ENV=${APP_ENV:-prod}
cat <<EOF > "${GOGOCARTO_CODE}"/.env
###> symfony/framework-bundle ###
APP_ENV=$APP_ENV
APP_SECRET=82ec369b81caab5446ddfc3b5edb4d00
CSRF_PROTECTION=$(
[ "$APP_ENV" == "prod" ] &&
echo "true" ||
echo "false") ## active csrf protection on production servers
#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
#TRUSTED_HOSTS='^localhost|example\.com$'
###< symfony/framework-bundle ###
###> vich upload ###
IMAGES_MAX_FILESIZE=8M # for public images upload
IMAGE_RESIZE_WIDTH=1000 # in pixel
FILES_MAX_FILESIZE=1M # for other public file upload
###> vich upload ###
USE_AS_SAAS=false
CONTACT_EMAIL=contact@localhost.fr
INSTANCE_NAME=GoGoCarto
###> symfony/swiftmailer-bundle ###
# For Gmail as a transport, use: "gmail://username:password@localhost"
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
# Delivery is disabled by default via "null://localhost"
MAILER_URL=gmail://test.gogocarto:creerdescartesagogo@localhost
FROM_EMAIL=test.gogocarto@gmail.com
###< symfony/swiftmailer-bundle ###
###> hwi/oauth-bundle ###
OAUTH_COMMUNS_ID=disabled
OAUTH_COMMUNS_SECRET=disabled
OAUTH_GOOGLE_ID=disabled
OAUTH_GOOGLE_SECRET=disabled
OAUTH_FACEBOOK_ID=disabled
OAUTH_FACEBOOK_SECRET=disabled
###< hwi/oauth-bundle ###
###> sentry/sentry-symfony ###
# Log errors nicely with sentry. Create your account on sentry.io and provide the DSN here
# exple: SENTRY_DSN=https://6145d1aac36c429781fc1b0f79b0da48@sentry.io/1402018
SENTRY_DSN=
###< sentry/sentry-symfony ###
EOF
}
symphony() {
export COMPOSE_IGNORE_ORPHANS=true
## We don't want post deploy that is doing the final http initialization.
compose --debug -q --no-init --no-post-deploy \
--without-relation="$SERVICE_NAME":web-proxy \
run \
"${symphony_docker_run_opts[@]}" \
-T --rm -w /opt/apps/gogocarto \
--entrypoint php \
-u www-data "$SERVICE_NAME" bin/console "$@" | cat
return "${PIPESTATUS[0]}"
}