From 734c9dc70ca05d74a94b94b78e3ff5ce3793925a Mon Sep 17 00:00:00 2001 From: MayaChat Date: Mon, 24 Nov 2025 13:41:08 -0500 Subject: [PATCH] Refactor Docker setup and enhance PWA features with service worker, caching, and manifest updates --- Dockerfile | 16 ++++++- docker-compose.yml | 9 +--- index.html | 23 ++++++++++ logos/icon-192.png | Bin 0 -> 10609 bytes logos/icon-192.svg | 8 ++++ logos/icon-512.png | Bin 0 -> 157410 bytes manifest.json | 39 +++++++++++++++++ sw.js | 102 +++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 188 insertions(+), 9 deletions(-) create mode 100644 logos/icon-192.png create mode 100644 logos/icon-192.svg create mode 100644 logos/icon-512.png create mode 100644 manifest.json create mode 100644 sw.js diff --git a/Dockerfile b/Dockerfile index db9c5ea..798f3fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,19 @@ FROM nginx:alpine LABEL maintainer="services-homepage" -COPY . /usr/share/nginx/html + +# Copy all static files into the image +COPY index.html /usr/share/nginx/html/ +COPY styles.css /usr/share/nginx/html/ +COPY manifest.json /usr/share/nginx/html/ +COPY sw.js /usr/share/nginx/html/ +COPY README.md /usr/share/nginx/html/ +COPY FAQ.md /usr/share/nginx/html/ +COPY logos/ /usr/share/nginx/html/logos/ +COPY js/ /usr/share/nginx/html/js/ +COPY nginx.conf /etc/nginx/nginx.conf + +# Expose port 80 EXPOSE 80 + +# services.xml will be mounted at runtime as a bind mount CMD ["nginx", "-g", "daemon off;"] diff --git a/docker-compose.yml b/docker-compose.yml index 61effc0..42ac4d0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,19 +1,12 @@ version: '3.8' services: services-homepage: - image: nginx:alpine + build: . container_name: services-homepage ports: - "8088:80" volumes: - - ./index.html:/usr/share/nginx/html/index.html:ro - ./services.xml:/usr/share/nginx/html/services.xml:ro - - ./styles.css:/usr/share/nginx/html/styles.css:ro - - ./logos:/usr/share/nginx/html/logos:ro - - ./js:/usr/share/nginx/html/js:ro - - ./README.md:/usr/share/nginx/html/README.md:ro - - ./FAQ.md:/usr/share/nginx/html/FAQ.md:ro - - ./nginx.conf:/etc/nginx/nginx.conf:ro restart: unless-stopped logging: driver: json-file diff --git a/index.html b/index.html index 248e232..4dbd8bf 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,16 @@ Services Homepage + + + + + + + + + + @@ -53,6 +63,19 @@