mirror of
https://github.com/zulip/docker-zulip.git
synced 2025-11-02 04:53:38 +00:00
Added env vars: MANUAL_CONFIGURATION and LINK_SETTINGS_TO_DATA
The default is now to not link the settings folder to the data volume
This commit is contained in:
@@ -33,12 +33,12 @@ RUN apt-get -q update && \
|
||||
|
||||
COPY includes/supervisor/conf.d/zulip_postsetup.conf /etc/supervisor/conf.d/zulip_postsetup.conf
|
||||
COPY includes/createZulipAdmin.sh /opt/createZulipAdmin.sh
|
||||
COPY docker-entrypoint.sh /entrypoint.sh
|
||||
COPY docker-entrypoint.sh /sbin/entrypoint.sh
|
||||
|
||||
RUN chown zulip:zulip /opt/createZulipAdmin.sh
|
||||
|
||||
VOLUME ["$DATA_DIR"]
|
||||
EXPOSE 80 443
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
ENTRYPOINT ["/sbin/entrypoint.sh"]
|
||||
CMD ["app:run"]
|
||||
|
||||
@@ -59,6 +59,8 @@ AUTO_BACKUP_ENABLED="${AUTO_BACKUP_ENABLED:-True}"
|
||||
AUTO_BACKUP_INTERVAL="${AUTO_BACKUP_INTERVAL:-30 3 * * *}"
|
||||
# Zulip configuration function specific variable(s)
|
||||
SPECIAL_SETTING_DETECTION_MODE="${SPECIAL_SETTING_DETECTION_MODE:-True}"
|
||||
MANUAL_CONFIGURATION="${MANUAL_CONFIGURATION:-false}"
|
||||
LINK_SETTINGS_TO_DATA="${LINK_SETTINGS_TO_DATA:-false}"
|
||||
# entrypoint.sh specific variable(s)
|
||||
ZPROJECT_SETTINGS="/home/zulip/deployments/current/zproject/settings.py"
|
||||
SETTINGS_PY="/etc/zulip/settings.py"
|
||||
@@ -88,21 +90,19 @@ prepareDirectories() {
|
||||
rm -rf /home/zulip/uploads
|
||||
ln -sfT "$DATA_DIR/uploads" /home/zulip/uploads
|
||||
chown zulip:zulip -R "$DATA_DIR/uploads"
|
||||
# Create settings directories
|
||||
if [ ! -d "$DATA_DIR/settings" ]; then
|
||||
mkdir -p "$DATA_DIR/settings"
|
||||
fi
|
||||
# Link settings folder
|
||||
if [ ! -d "$DATA_DIR/settings/etc-zulip" ]; then
|
||||
cp -rf /etc/zulip "$DATA_DIR/settings/etc-zulip"
|
||||
else
|
||||
if [ -h "$DATA_DIR/settings/etc-zulip" ]; then
|
||||
rm -rf "$DATA_DIR/settings/etc-zulip"
|
||||
if [ "$LINK_SETTINGS_TO_DATA" == "True" ] || [ "$LINK_SETTINGS_TO_DATA" == "true" ]; then
|
||||
# Create settings directories
|
||||
if [ ! -d "$DATA_DIR/settings" ]; then
|
||||
mkdir -p "$DATA_DIR/settings"
|
||||
fi
|
||||
if [ ! -d "$DATA_DIR/settings/etc-zulip" ]; then
|
||||
cp -rf /etc/zulip "$DATA_DIR/settings/etc-zulip"
|
||||
fi
|
||||
# Link /etc/zulip/ settings folder
|
||||
rm -rf /etc/zulip
|
||||
ln -sfT "$DATA_DIR/settings/etc-zulip" /etc/zulip
|
||||
fi
|
||||
# Link /etc/zulip/ settings folder
|
||||
rm -rf /etc/zulip
|
||||
ln -sfT "$DATA_DIR/settings/etc-zulip" /etc/zulip
|
||||
echo "Prepared and linked the uploads directory."
|
||||
}
|
||||
setConfigurationValue() {
|
||||
@@ -338,10 +338,12 @@ initialConfiguration() {
|
||||
prepareDirectories
|
||||
nginxConfiguration
|
||||
configureCerts
|
||||
secretsConfiguration
|
||||
databaseConfiguration
|
||||
authenticationBackends
|
||||
zulipConfiguration
|
||||
if [ "$MANUAL_CONFIGURATION" == "False" ] || [ "$MANUAL_CONFIGURATION" == "false" ]; then
|
||||
secretsConfiguration
|
||||
authenticationBackends
|
||||
zulipConfiguration
|
||||
fi
|
||||
autoBackupConfiguration
|
||||
echo "=== End Initial Configuration Phase ==="
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user