forked from wazuh/wazuh-docker
Disable old persistence method
This is a temporary setting to achieve service stability, a new method for data persistence is on the works
This commit is contained in:
+2
-8
@@ -37,20 +37,14 @@ RUN curl --fail --silent -L https://github.com/just-containers/s6-overlay/releas
|
|||||||
tar xzf /tmp/s6-overlay-amd64.tar.gz -C /usr ./bin && \
|
tar xzf /tmp/s6-overlay-amd64.tar.gz -C /usr ./bin && \
|
||||||
rm /tmp/s6-overlay-amd64.tar.gz
|
rm /tmp/s6-overlay-amd64.tar.gz
|
||||||
|
|
||||||
# Adding first run script and entrypoint
|
|
||||||
COPY config/data_dirs.env config/init.bash /
|
|
||||||
|
|
||||||
# Sync calls are due to https://github.com/docker/docker/issues/9547
|
|
||||||
RUN chmod 755 /init.bash && \
|
|
||||||
sync && /init.bash && \
|
|
||||||
sync && rm /init.bash
|
|
||||||
|
|
||||||
COPY config/filebeat.yml /etc/filebeat/
|
COPY config/filebeat.yml /etc/filebeat/
|
||||||
|
|
||||||
RUN chmod go-w /etc/filebeat/filebeat.yml
|
RUN chmod go-w /etc/filebeat/filebeat.yml
|
||||||
|
|
||||||
COPY config/etc/ /etc/
|
COPY config/etc/ /etc/
|
||||||
|
|
||||||
|
COPY config/data_dirs.env /
|
||||||
|
|
||||||
# Setting volumes
|
# Setting volumes
|
||||||
VOLUME ["/var/ossec/data"]
|
VOLUME ["/var/ossec/data"]
|
||||||
VOLUME ["/etc/filebeat"]
|
VOLUME ["/etc/filebeat"]
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
# variables expected by this script.
|
# variables expected by this script.
|
||||||
|
|
||||||
# Startup the services
|
# Startup the services
|
||||||
source /data_dirs.env
|
|
||||||
|
|
||||||
FIRST_TIME_INSTALLATION=true
|
FIRST_TIME_INSTALLATION=true
|
||||||
|
|
||||||
@@ -36,16 +35,6 @@ edit_configuration() { # $1 -> setting, $2 -> value
|
|||||||
sed -i "s/^config.$1\s=.*/config.$1 = \"$2\";/g" "${DATA_PATH}/api/configuration/config.js" || error_and_exit "sed (editing configuration)"
|
sed -i "s/^config.$1\s=.*/config.$1 = \"$2\";/g" "${DATA_PATH}/api/configuration/config.js" || error_and_exit "sed (editing configuration)"
|
||||||
}
|
}
|
||||||
|
|
||||||
for ossecdir in "${DATA_DIRS[@]}"; do
|
|
||||||
if [ ! -e "${DATA_PATH}/${ossecdir}" ]
|
|
||||||
then
|
|
||||||
print "Installing ${ossecdir}"
|
|
||||||
exec_cmd "mkdir -p $(dirname ${DATA_PATH}/${ossecdir})"
|
|
||||||
exec_cmd "cp -pr /var/ossec/${ossecdir}-template ${DATA_PATH}/${ossecdir}"
|
|
||||||
FIRST_TIME_INSTALLATION=true
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -e ${WAZUH_INSTALL_PATH}/etc-template ]
|
if [ -e ${WAZUH_INSTALL_PATH}/etc-template ]
|
||||||
then
|
then
|
||||||
cp -p /var/ossec/etc-template/internal_options.conf /var/ossec/etc/internal_options.conf
|
cp -p /var/ossec/etc-template/internal_options.conf /var/ossec/etc/internal_options.conf
|
||||||
|
|||||||
Reference in New Issue
Block a user