[DOCKER] Remove quotes from docker env files, as docker (or at least docker-compose) include them in the actual value
This commit is contained in:
parent
c894a4faa4
commit
b824a0425e
46
bin/configure
vendored
46
bin/configure
vendored
|
@ -280,8 +280,8 @@ fi
|
||||||
mkdir -p "${INSTALL_DIR}/docker/bootstrap"
|
mkdir -p "${INSTALL_DIR}/docker/bootstrap"
|
||||||
cat > "${INSTALL_DIR}/docker/bootstrap/bootstrap.env" <<EOF
|
cat > "${INSTALL_DIR}/docker/bootstrap/bootstrap.env" <<EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
DOMAIN="${DOMAIN}"
|
DOMAIN=${DOMAIN}
|
||||||
DOMAIN_ROOT="${DOMAIN_ROOT}"
|
DOMAIN_ROOT=${DOMAIN_ROOT}
|
||||||
SIGNED=${LE_CERT}
|
SIGNED=${LE_CERT}
|
||||||
EOF
|
EOF
|
||||||
[ -n "${EMAIL}" ] && echo EMAIL="${EMAIL}" >> "${INSTALL_DIR}/docker/bootstrap/bootstrap.env"
|
[ -n "${EMAIL}" ] && echo EMAIL="${EMAIL}" >> "${INSTALL_DIR}/docker/bootstrap/bootstrap.env"
|
||||||
|
@ -303,11 +303,11 @@ POSTGRES_PASSWORD=${DB_PASSWORD}
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
cat > "${INSTALL_DIR}/docker/db/db.env" <<EOF
|
cat > "${INSTALL_DIR}/docker/db/db.env" <<EOF
|
||||||
DBMS="${DBMS}"
|
DBMS=${DBMS}
|
||||||
MYSQL_ROOT_PASSWORD="${DB_ROOT_PASSWORD}"
|
MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
|
||||||
MYSQL_DATABASE="${DB_NAME}"
|
MYSQL_DATABASE=${DB_NAME}
|
||||||
MYSQL_USER="${DB_USER}"
|
MYSQL_USER=${DB_USER}
|
||||||
MYSQL_PASSWORD="${DB_PASSWORD}"
|
MYSQL_PASSWORD=${DB_PASSWORD}
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -319,15 +319,15 @@ echo "MAILER_DSN=${MAILER_DSN}" >> .env.local
|
||||||
|
|
||||||
mkdir -p "${INSTALL_DIR}/docker/social"
|
mkdir -p "${INSTALL_DIR}/docker/social"
|
||||||
cat > "${INSTALL_DIR}/docker/social/social.env" <<EOF
|
cat > "${INSTALL_DIR}/docker/social/social.env" <<EOF
|
||||||
SOCIAL_DBMS="${DBMS}"
|
SOCIAL_DBMS=${DBMS}
|
||||||
SOCIAL_DB="${DB_NAME}"
|
SOCIAL_DB=${DB_NAME}
|
||||||
SOCIAL_USER="${DB_USER}"
|
SOCIAL_USER=${DB_USER}
|
||||||
SOCIAL_PASSWORD="${DB_PASSWORD}"
|
SOCIAL_PASSWORD=${DB_PASSWORD}
|
||||||
SOCIAL_DOMAIN="${DOMAIN}"
|
SOCIAL_DOMAIN=${DOMAIN}
|
||||||
SOCIAL_SITENAME="${SITENAME}"
|
SOCIAL_SITENAME=${SITENAME}
|
||||||
SOCIAL_ADMIN_EMAIL="${EMAIL}"
|
SOCIAL_ADMIN_EMAIL=${EMAIL}
|
||||||
SOCIAL_SITE_PROFILE="${PROFILE}"
|
SOCIAL_SITE_PROFILE=${PROFILE}
|
||||||
MAILER_DSN="${MAILER_DSN}"
|
MAILER_DSN=${MAILER_DSN}
|
||||||
EOF
|
EOF
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -348,12 +348,12 @@ fi
|
||||||
|
|
||||||
|
|
||||||
cat > "${INSTALL_DIR}/docker/mail/mail.env" <<EOF
|
cat > "${INSTALL_DIR}/docker/mail/mail.env" <<EOF
|
||||||
MAIL_DOMAIN="${MAIL_DOMAIN}"
|
MAIL_DOMAIN=${MAIL_DOMAIN}
|
||||||
MAIL_USER="${MAIL_SENDER_USER}"
|
MAIL_USER=${MAIL_SENDER_USER}
|
||||||
MAIL_NAME="${MAIL_SENDER_NAME}"
|
MAIL_NAME=${MAIL_SENDER_NAME}
|
||||||
MAIL="${MAIL_SENDER_USER}@${MAIL_DOMAIN}"
|
MAIL=${MAIL_SENDER_USER}@${MAIL_DOMAIN}
|
||||||
SSL_CERT=/etc/letsencrypt/live/${MAIL_DOMAIN_ROOT}/fullchain.pem
|
SSL_CERT=/etc/letsencrypt/live/${MAIL_DOMAIN}/fullchain.pem
|
||||||
SSL_KEY=/etc/letsencrypt/live/${MAIL_DOMAIN_ROOT}/privkey.pem
|
SSL_KEY=/etc/letsencrypt/live/${MAIL_DOMAIN}/privkey.pem
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
HASHED_PASSWORD="{SHA512-CRYPT}"$(echo "${MAIL_PASSWORD}" | openssl passwd -6 -in -)
|
HASHED_PASSWORD="{SHA512-CRYPT}"$(echo "${MAIL_PASSWORD}" | openssl passwd -6 -in -)
|
||||||
|
@ -379,7 +379,7 @@ sed -i -e "s/^.*#HOSTNAME/${MAILNAME}#HOSTNAME/" "${INSTALL_DIR}/docker/mail/con
|
||||||
# Prepare mail user
|
# Prepare mail user
|
||||||
echo "${MAIL_DOMAIN_ROOT} #OK" > "${INSTALL_DIR}/docker/mail/config/domains"
|
echo "${MAIL_DOMAIN_ROOT} #OK" > "${INSTALL_DIR}/docker/mail/config/domains"
|
||||||
echo "${MAIL_USER} ${MAIL_USER}" > "${INSTALL_DIR}/docker/mail/config/aliases"
|
echo "${MAIL_USER} ${MAIL_USER}" > "${INSTALL_DIR}/docker/mail/config/aliases"
|
||||||
echo "${MAIL_USER} ${MAIL_DOMAIN_ROOT}/${MAIL_USER}/" > "${INSTALL_DIR}/docker/mail/config/mailboxes"
|
echo "${MAIL_USER} ${MAIL_DOMAIN}/${MAIL_USER}/" > "${INSTALL_DIR}/docker/mail/config/mailboxes"
|
||||||
echo "${MAIL_USER}:${HASHED_PASSWORD}" > "${INSTALL_DIR}/docker/mail/config/passwd"
|
echo "${MAIL_USER}:${HASHED_PASSWORD}" > "${INSTALL_DIR}/docker/mail/config/passwd"
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ lets_path="/etc/letsencrypt"
|
||||||
|
|
||||||
echo "Starting bootstrap"
|
echo "Starting bootstrap"
|
||||||
|
|
||||||
if [ ! -e "$lets_path/live//options-ssl-nginx.conf" ] || [ ! -e "$lets_path/live/ssl-dhparams.pem" ];then
|
if [ ! -e "${lets_path}/live/${DOMAIN}/options-ssl-nginx.conf" ] || [ ! -e "$lets_path/live/ssl-dhparams.pem" ];then
|
||||||
echo "### Downloading recommended TLS parameters ..."
|
echo "### Downloading recommended TLS parameters ..."
|
||||||
mkdir -p "${lets_path}/live/${DOMAIN}"
|
mkdir -p "${lets_path}/live/${DOMAIN}"
|
||||||
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
echo " certbot:
|
|
||||||
image: certbot/certbot
|
|
||||||
depends_on:
|
|
||||||
- nginx
|
|
||||||
# Check for certificate renewal every 12h as
|
|
||||||
# recommended by Let's Encrypt
|
|
||||||
entrypoint: /bin/sh -c 'trap exit TERM;
|
|
||||||
while :; do
|
|
||||||
certbot renew > /dev/null;
|
|
||||||
sleep 12h & wait \$\${!};
|
|
||||||
done'
|
|
||||||
volumes:
|
|
||||||
- ./docker/certbot/www:/var/www/certbot
|
|
||||||
- ./docker/certbot/.files:/etc/letsencrypt\n" >> docker-compose.yaml
|
|
Loading…
Reference in New Issue
Block a user