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=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) by gnuweeb.org (Postfix) with ESMTPS id 3B4F97E3A7 for ; Sun, 17 Apr 2022 13:52:57 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=iRJNcR85; dkim-atps=neutral Received: by mail-lj1-f173.google.com with SMTP id bf11so2589337ljb.7 for ; Sun, 17 Apr 2022 06:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BFE8v8zi03xO2uLMX82Wh0P7KPWKFFoGQRVcAdqEcgY=; b=iRJNcR85ajScSOa3V0Tk/PZ5uGEF4FY7zYCm3JKljQ5Z4m5ZRFWR9numTAsmdnfS5l x1NzIV1C8C+2+7cdkiIXw2JmS3fsZjX5uWw6Mt5HrEU+hp0R5dkR3AMncB1LkRtXRKTd 5chKP7fl7gYs00Izx6NC1/2mdjR3XcfQNQHVgx1EnSZLdlzts8+Pm6msn4gVV/gdxJga DWlju/h0RkEoaY376a2RPin9+1x9BHzT2rPVub3fJ2WrC2CO3yJqrKOLLm82xuAtQXIi v0zD/icIDNWwWGxUsWfxbNDF87/DRzEQ7cL+97kFRUfMxB8w3VZ/2rme0fzGsuzKnC45 zS3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BFE8v8zi03xO2uLMX82Wh0P7KPWKFFoGQRVcAdqEcgY=; b=1q9T6bLUrNKJIWF6hJnedl555wRuNMak9WAAH/khKeFy213fJFuYtWDa10h0ZRIYPP 3GjZBwDb9zyrvaNArmbJn3BBfnPVimJprw947vTxBpYFD1rs6x+a0RSlpzfRh5sghcJb HfcyDa+mMI4Wetoy4CI01Buiu2YI1hNquGps8zDuXthNhwwNqm9R11PtaGn9PgYE0qfS EvQCCb7yJ4hAL3iKqNxaw5ydUV/ExdUiVw5+6pU2kXdcmTVKoAyIvnb1VykH7xCIihM+ mctLCNojLHY/8ZyTulAsIGMaInW4ME/Zxyq3RimulsyZkeO1supbGLkQVO4rqhV9ZIWg tJ6Q== X-Gm-Message-State: AOAM530ORjKHaeEZo0g19yV2yky+lLif9WZMoYK0ou9UkvAlAk+7FtnS XZOpmPm7vvRgmXVtqvxs2c2Hgp5em8F/DjqJKQM= X-Google-Smtp-Source: ABdhPJy5UZWl9Znn/dmEfQaMkhjksW9MiDTIHMLtotV90oHfvrBEMSYA06yAHo/cW34KbF0o0jmbyGSw+361fj7/6jg= X-Received: by 2002:a05:651c:b12:b0:24b:1338:1416 with SMTP id b18-20020a05651c0b1200b0024b13381416mr4838582ljr.92.1650203575434; Sun, 17 Apr 2022 06:52:55 -0700 (PDT) MIME-Version: 1.0 References: <20220417125125.160068-1-ammarfaizi2@gnuweeb.org> <20220417125125.160068-3-ammarfaizi2@gnuweeb.org> In-Reply-To: From: Alviro Iskandar Setiawan Date: Sun, 17 Apr 2022 20:52:44 +0700 Message-ID: Subject: Re: [PATCH server-a001 v1 2/2] Install MySQL server To: Ammar Faizi Cc: "GNU/Weeb Mailing List" , Hazmi Alfarizqi , Hazmi Alfarizqi , Alviro Iskandar Setiawan Content-Type: text/plain; charset="UTF-8" List-Id: On Sun, Apr 17, 2022 at 8:45 PM Ammar Faizi wrote: > On 4/17/22 8:34 PM, Alviro Iskandar Setiawan wrote: > > On Sun, Apr 17, 2022 at 8:26 PM Ammar Faizi wrote: > >> On 4/17/22 8:06 PM, Alviro Iskandar Setiawan wrote: > > [...] > >>> Also, it needs persistent storage, container is temporary, but our > >>> database is permanent??? > >> > >> This is not a Dockerfile problem, it's a container problem. Which is > >> done at `docker run`. So there is no relevance with mounting host's > >> directory. > >> > >> The change is about Dockerfile. And we don't use a docker-compose.yml > >> here. I don't see the need to involve that. Yes? No? Comment? > > > > Yes, but how do you tell other maintainers to mount the volume > > correctly if you don't provide any mechanism in doing this? You should > > tell us how to run it too! > > OK, I understand your concern. > > The database file that needs to be persistent lives in /var/lib/mysql. > > So: > > docker run -v $HOST_DIR_FOR_MYSQL_DATA:/var/lib/mysql ... > > something like that... > > I will provide something for it in the v2. Anyway, since the mysql user > is managed by a database as well, this will be persistent across docker > run too. Hence, it's the host responsibility to retain the mysql users. I don't think we should retain mysql users! This may break with different database versions, the "mysql" table is an internal thing that shouldn't be exported. User setup should always be re-done at initialization. Maybe you can put it in docker-entrypoint.sh???? -- Viro