GNU/Weeb Mailing List <[email protected]>
 help / color / mirror / Atom feed
* [PATCH a001 v1 0/7] server-a001 updates
@ 2023-03-29  7:59 Ammar Faizi
  2023-03-29  7:59 ` [PATCH a001 v1 1/7] Use nginx from Ubuntu for simplicity Ammar Faizi
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Ammar Faizi @ 2023-03-29  7:59 UTC (permalink / raw)
  To: GNU/Weeb Mailing List
  Cc: Muhamad Hazmi Alfarizqi, Muhamad Hazmi Alfarizqi,
	Alviro Iskandar Setiawan, Arthur Lapz, Ammar Faizi

Server-a001 updates.

There are 7 patches in this series. Everyone who was involved in the
recent changes is CC'ed.

1. Use nginx from Ubuntu for simplicity.

Using custom nginx package has different directory structures. It
confuses me when migrating the old data to this new docker container.
Just use the nginx that Ubuntu provides.

2. Add vmail storage directory.

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.

3. Dockerfile: Upgrade the Ubuntu version to 22.04.

Ubuntu 22.04 (jammy) has been released, upgrade the base image.

4. Dockerfile: Set the default main user to "ubuntu".

The usual main user name on a ubuntu server is "ubuntu". Adjust it to
that.

5. Add an installer script to simplify the docker image installation.

6. Create a simple init program.

Using "tail -f /dev/null" as the init program is wrong because it
doesn't handle the SIGCHLD signal, resulting many zombie processes like
these:

  Zs  [master] <defunct>
  Z   [qmgr] <defunct>
  Zs  [dovecot] <defunct>
  Z   [anvil] <defunct>
  Z   [log] <defunct>
  Z   [config] <defunct>
  Z   [tlsmgr] <defunct>
  Z   [stats] <defunct>
  Z   [imap-login] <defunct>
  Z   [imap] <defunct>
  Z   [imap-login] <defunct>
  Z   [imap] <defunct>
  Z   [imap-login] <defunct>
  Z   [imap] <defunct>
  Z   [pickup] <defunct>
  Zs  [dovecot] <defunct>
  Z   [anvil] <defunct>
  Z   [log] <defunct>
  Z   [config] <defunct>
  Z   [imap-login] <defunct>
  Z   [stats] <defunct>
  Z   [imap] <defunct>

Create a simple init program that ignores SIGCHLD so that the zombie
processes are gone.

7. docker-entrypoint: Properly set directory ownership and mode

When the container is restarted, the ownership and mode of the mounted
directories might have changed. Ensure we correct them properly at
initialization. While in there, also change "service rsyslog start" with
directly invoke "/usr/sbin/rsyslogd". Using Ubuntu 22.04 can't start it
using service:

  # service rsyslog start
  rsyslog: unrecognized service

Signed-off-by: Ammar Faizi <[email protected]>
---

Ammar Faizi (7):
  Use nginx from Ubuntu for simplicity
  start.sh: Add vmail storage directory
  Dockerfile: Upgrade the Ubuntu version to 22.04 (jammy)
  Dockerfile: Set the default main user to "ubuntu"
  Add an installer script
  Create a simple init program
  docker-entrypoint: Properly set directory ownership and mode

 .gitignore             |  1 +
 Dockerfile             | 29 ++++++++++++-----------------
 apt-sources/nginx.list |  2 --
 docker-entrypoint.sh   | 15 ++++++++++++---
 init.c                 | 15 +++++++++++++++
 install.sh             |  5 +++++
 start.sh               |  6 +++++-
 7 files changed, 50 insertions(+), 23 deletions(-)
 delete mode 100644 apt-sources/nginx.list
 create mode 100644 init.c
 create mode 100755 install.sh


base-commit: dff27b4c7f105d30824fc3b54ef40f7870332a50
-- 
Ammar Faizi


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-03-29 19:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH a001 v1 2/7] start.sh: Add vmail storage directory Ammar Faizi
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox