From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1680076792; bh=1fwMY6ebN8c8xhl+3OaZVNrWgftUEIsTxN/DRgjEx8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=MWsMKkWFM3xUnLc6SrJpDSHiwYMUSu9yU0EWzAODLD3UxELsaFaBy0EbiOdBPZTPb e9IR9sBWmFDW+cUMtsQLxTMJKDb2NTtTOh2HQPnWIwZ6GM4kNeZUsrCCHDY4cGuZiM 440CQfQr5u4FEsqbscv8gClgRpJo4gU4Ylnf3ClNjbRlB0cByiEvoaonjUhLNka3/P Z3Rl/u0bya/El9kY6YReY4H4R3owCz+HyvCapoOBWLSdjiHohgx6XAb3cZp5CU2pwZ yhUwW33KGg5vgK4BY4WvOGtlc7o0e9qZ/X402XBK5yFp2sL1pTgx15/bgPAfJ+E4MU Bd7EivZrKmfdg== Received: from localhost.localdomain (unknown [182.253.88.211]) by gnuweeb.org (Postfix) with ESMTPSA id 4A89F2413E2; Wed, 29 Mar 2023 07:59:48 +0000 (UTC) From: Ammar Faizi To: GNU/Weeb Mailing List Cc: Muhamad Hazmi Alfarizqi , Muhamad Hazmi Alfarizqi , Alviro Iskandar Setiawan , Arthur Lapz , Ammar Faizi Subject: [PATCH a001 v1 2/7] start.sh: Add vmail storage directory Date: Wed, 29 Mar 2023 14:59:27 +0700 Message-Id: <20230329075932.492885-3-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230329075932.492885-1-ammarfaizi2@gnuweeb.org> References: <20230329075932.492885-1-ammarfaizi2@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: vmail will contain the mailbox data for each user. It should be mounted from the host to make the backup process easy and won't be destroyed when the container is dead. Signed-off-by: Ammar Faizi --- start.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 706c3626f4a22a95..70e72b629a4d6e84 100755 --- a/start.sh +++ b/start.sh @@ -5,16 +5,19 @@ HOSTNAME="gnuweeb.org"; CONTAINER_NAME="server-a001-ct"; MYSQL_DATA_DIR="./storage/mysql_data"; KEYS_DIR="./storage/keys"; +VMAIL_DIR="./storage/vmail"; SSL_KEYS_DIR="./storage/ssl"; DKIM_KEYS_DIR="./storage/dkim"; -mkdir -pv "$MYSQL_DATA_DIR"; +mkdir -pv "${MYSQL_DATA_DIR}"; mkdir -pv "${KEYS_DIR}/ssl"; mkdir -pv "${KEYS_DIR}/dkim"; +mkdir -pv "${VMAIL_DIR}"; MYSQL_DATA_DIR="$(readlink -e "${MYSQL_DATA_DIR}")"; KEYS_DIR="$(readlink -e "${KEYS_DIR}")"; +VMAIL_DIR="$(readlink -e ${VMAIL_DIR})"; CMD="$1"; @@ -30,6 +33,7 @@ if [[ "${CMD}" == "run" ]]; then --hostname "${HOSTNAME}" \ --mount "type=volume,dst=/var/keys,volume-driver=local,volume-opt=type=none,volume-opt=o=bind,volume-opt=device=${KEYS_DIR}" \ --mount "type=volume,dst=/var/lib/mysql,volume-driver=local,volume-opt=type=none,volume-opt=o=bind,volume-opt=device=${MYSQL_DATA_DIR}" \ + --mount "type=volume,dst=/var/vmail,volume-driver=local,volume-opt=type=none,volume-opt=o=bind,volume-opt=device=${VMAIL_DIR}" \ --tty \ --interactive \ --detach \ -- Ammar Faizi