GNU/Weeb Mailing List <[email protected]>
 help / color / mirror / Atom feed
From: Ammar Faizi <[email protected]>
To: GNU/Weeb Mailing List <[email protected]>
Cc: Muhamad Hazmi Alfarizqi <[email protected]>,
	Muhamad Hazmi Alfarizqi <[email protected]>,
	Alviro Iskandar Setiawan <[email protected]>,
	Arthur Lapz <[email protected]>,
	Ammar Faizi <[email protected]>
Subject: [PATCH a001 v1 2/7] start.sh: Add vmail storage directory
Date: Wed, 29 Mar 2023 14:59:27 +0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

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 <[email protected]>
---
 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


  parent reply	other threads:[~2023-03-29  7:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29  7:59 [PATCH a001 v1 0/7] server-a001 updates Ammar Faizi
2023-03-29  7:59 ` [PATCH a001 v1 1/7] Use nginx from Ubuntu for simplicity Ammar Faizi
2023-03-29  7:59 ` Ammar Faizi [this message]
2023-03-29  7:59 ` [PATCH a001 v1 3/7] Dockerfile: Upgrade the Ubuntu version to 22.04 (jammy) Ammar Faizi
2023-03-29  7:59 ` [PATCH a001 v1 4/7] Dockerfile: Set the default main user to "ubuntu" Ammar Faizi
2023-03-29  7:59 ` [PATCH a001 v1 5/7] Add an installer script Ammar Faizi
2023-03-29  7:59 ` [PATCH a001 v1 6/7] Create a simple init program Ammar Faizi
2023-03-29  7:59 ` [PATCH a001 v1 7/7] docker-entrypoint: Properly set directory ownership and mode Ammar Faizi
2023-03-29 19:36 ` [PATCH a001 v1 0/7] server-a001 updates Alviro Iskandar Setiawan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox