Hello community,

here is the log from the commit of package opensuse-nginx-image for 
openSUSE:Factory checked in at 2020-02-20 14:55:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/opensuse-nginx-image (Old)
 and      /work/SRC/openSUSE:Factory/.opensuse-nginx-image.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "opensuse-nginx-image"

Thu Feb 20 14:55:50 2020 rev:3 rq:777383 version:1.0.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/opensuse-nginx-image/opensuse-nginx-image.changes    
    2020-02-10 21:54:54.818240415 +0100
+++ 
/work/SRC/openSUSE:Factory/.opensuse-nginx-image.new.26092/opensuse-nginx-image.changes
     2020-02-20 14:56:02.166365263 +0100
@@ -1,0 +2,11 @@
+Wed Feb 19 15:01:55 UTC 2020 - Thorsten Kukuk <[email protected]>
+
+- Adjust config.sh
+
+-------------------------------------------------------------------
+Wed Feb 19 12:10:53 UTC 2020 - Thorsten Kukuk <[email protected]>
+
+- Change handling of /etc/nginx: allow to only mount nginx.conf
+- Mount htdocs to /srv/www/htdocs and not /data/htdocs
+
+-------------------------------------------------------------------
@@ -4,0 +16,5 @@
+
+-------------------------------------------------------------------
+Thu Jan 23 15:24:44 UTC 2020 - Thorsten Kukuk <[email protected]>
+
+- Replace busybox man/groff with mandoc

New:
----
  config.sh

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ opensuse-nginx-image.kiwi ++++++
--- /var/tmp/diff_new_pack.ctnaqS/_old  2020-02-20 14:56:04.138369133 +0100
+++ /var/tmp/diff_new_pack.ctnaqS/_new  2020-02-20 14:56:04.142369140 +0100
@@ -48,7 +48,7 @@
   </repository>
   <packages type="bootstrap">
     <package name="nginx"/>
-    <package name="groff"/>
+    <package name="mandoc"/>
     <archive name="entrypoint.tar.gz"/>
   </packages>
 </image>

++++++ README ++++++
--- /var/tmp/diff_new_pack.ctnaqS/_old  2020-02-20 14:56:04.434369714 +0100
+++ /var/tmp/diff_new_pack.ctnaqS/_new  2020-02-20 14:56:04.434369714 +0100
@@ -1,6 +1,9 @@
 The command to run this container is:
 
-podman run -d --rm -v /srv/nginx:/data --name nginx -p 80:80/tcp -p 
443:443/tcp registry.opensuse.org/opensuse/nginx
+podman run -d --rm -v /srv/nginx/etc:/etc/nginx -v 
/srv/nginx/htdocs:/srv/www/htdocs --name nginx -p 80:80/tcp -p 443:443/tcp 
registry.opensuse.org/opensuse/nginx
 
 Configuration files should be stored in /srv/nginx/etc
 Webpages should be stored in /srv/nginx/htdocs
+
+It is possible to only override nginx.conf:
+podman run -d --rm -v /srv/nginx/etc/nginx.conf:/etc/nginx/nginx.conf --name 
nginx -p 80:80/tcp -p 443:443/tcp registry.opensuse.org/opensuse/nginx

++++++ config.sh ++++++
#!/bin/sh

#--------------------------------------
#test -f /.profile && . /.profile

#======================================
# Greeting...
#--------------------------------------
echo "Configure image: [$kiwi_iname]..."

mkdir -p /usr/local/nginx/etc
cp -av /etc/nginx/* /usr/local/nginx/etc/
rm /etc/nginx/*.default
rm /usr/local/nginx/etc/*.default
mkdir -p /usr/local/nginx/htdocs
cp -av /srv/www/htdocs/* /usr/local/nginx/htdocs

exit 0
++++++ entrypoint.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/usr/local/bin/entrypoint.sh 
new/usr/local/bin/entrypoint.sh
--- old/usr/local/bin/entrypoint.sh     2020-01-21 21:07:05.481264386 +0100
+++ new/usr/local/bin/entrypoint.sh     2020-02-19 15:53:40.633718562 +0100
@@ -1,28 +1,27 @@
 #!/bin/bash
 set -e
-set -x
 
-DATA_DIR=/data
+ETC_DIR=/etc/nginx
+HTDOCS_DIR=/srv/www/htdocs
 
-create_nginx_data_dir() {
-  mkdir -p ${DATA_DIR}
-
-  # populate default nginx configuration if it does not exist
-  if [ ! -d ${DATA_DIR}/etc ]; then
-      mkdir ${DATA_DIR}/etc
-      mv /etc/nginx/* ${DATA_DIR}/etc/
-  fi
-  rm -rf /etc/nginx
-  ln -sf ${DATA_DIR}/etc /etc/nginx
+create_nginx_etc_dir() {
+    # populate default nginx configuration if it does not exist
+    if [ ! -f ${ETC_DIR}/nginx.conf ]; then
+       echo "Populate ${ETC_DIR}"
+       cp -a /usr/local/nginx/etc/* ${ETC_DIR}/
+    fi
+}
 
-  if [ ! -d ${DATA_DIR}/htdocs ]; then
-    mv /srv/www/htdocs ${DATA_DIR}/
-  fi
-  rm -rf /srv/www/htdocs
-  ln -sf ${DATA_DIR}/htdocs /srv/www/
+create_nginx_htdocs_dir() {
+    # populate default nginx configuration if it does not exist
+    if [ ! -f ${HTDOCS_DIR}/50x.html ]; then
+       echo "Populate ${HTDOCS_DIR}"
+       cp -a /usr/local/nginx/htdocs/* ${HTDOCS_DIR}/
+    fi
 }
 
-create_nginx_data_dir
+create_nginx_etc_dir
+create_nginx_htdocs_dir
 
 # allow arguments to be passed to nginx
 if [[ ${1:0:1} = '-' ]]; then


Reply via email to