diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ac1b0e1..6772d64 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: name: Prepare env variables run: | echo "BUILD_DATE=$(TZ=':UTC' date +'%Y-%m-%d %H:%M:%S (%Z)')" >> ${GITHUB_ENV} - echo "BUILD_VER=${GITHUB_SHA::7}" >> ${GITHUB_ENV} + echo "BUILD_FINGERPRINT=${GITHUB_SHA::7}" >> ${GITHUB_ENV} - name: Check out code @@ -62,10 +62,10 @@ jobs: file: ./docker/Dockerfile build-args: | BUILD_DATE=${{ env.BUILD_DATE }} - BUILD_VER=${{ env.BUILD_VER }} + BUILD_FINGERPRINT=${{ env.BUILD_FINGERPRINT }} tags: | legacyphp/gearman-ui:latest - ghcr.io/phplegacy/gearman-ui:latest + ghcr.io/phplegacy/gearman-ui-docker:latest pull: true push: true diff --git a/Makefile b/Makefile index 0c7df3a..b69096f 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,3 @@ logs: ## Show docker logs gearman-ui: docker-compose exec gearman-ui sh - -gearman: - docker-compose exec gearman sh diff --git a/README.md b/README.md index d0cc3a1..9d117d7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,14 @@ -# https://github.com/phplegacy/gearman-ui-docker/ +# Gearman UI Docker image +
+Docker image for [Gearman UI](https://github.com/phplegacy/gearman-ui), a small PHP application providing a minimal monitoring dashboard for a cluster of Gearman Job Servers. + +## Usage + +To run the server and expose the port2: + +## Configuration GEARMAN_SERVERS = 'Gearman#1:gearman:4730,Gearman#2:gearman2:4730'; diff --git a/docker-compose.yml b/docker-compose.yml index 27c18f1..4650536 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,8 +10,7 @@ services: restart: unless-stopped environment: - 'TZ=UTC' - - 'GEARMAN_SERVERS=Gearman#1:gearman:4730,Gearman#2:gearman2:4730' - - 'COMPOSE_CONVERT_WINDOWS_PATHS=1' + - 'GEARMAN_SERVERS=Gearman#1:gearman:4730' networks: - network1 diff --git a/docker/Dockerfile b/docker/Dockerfile index ae202d2..19e1944 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -3,6 +3,7 @@ FROM node:4-alpine as node WORKDIR /tmp/ ENV NODE_ENV=production +ENV NPM_CONFIG_UNSAFE_PERM=true # Core utilites install @@ -20,8 +21,7 @@ RUN set -eux \ && bower install --production --allow-root --silent -FROM php:5.6-fpm-alpine as php -LABEL org.opencontainers.image.source=https://github.com/phplegacy/gearman-ui-docker +FROM php:8.2-fpm-alpine as php ENV TERM="xterm-256color" \ LANGUAGE="en_US.UTF-8" \ @@ -81,13 +81,23 @@ ENV PATH ${PATH}:${HOME}/.composer/vendor/bin:/app/vendor/bin/ ENV COMPOSER_ALLOW_SUPERUSER=1 +LABEL org.opencontainers.image.title="Gearman UI Docker image" \ + org.opencontainers.image.description="phplegacy Gearman UI Docker image" \ + org.opencontainers.image.authors="https://github.com/phplegacy/gearman-ui-docker" \ + org.opencontainers.image.documentation="https://github.com/phplegacy/gearman-ui-docker" \ + org.opencontainers.image.url="https://github.com/phplegacy/gearman-ui-docker" \ + org.opencontainers.image.source="https://github.com/phplegacy/gearman-ui-docker" + ARG TZ='UTC' ENV TZ=$TZ + #These params meant to be set by CI ARG BUILD_DATE ENV BUILD_DATE=$BUILD_DATE -ARG BUILD_VER -ENV BUILD_VER=$BUILD_VER +RUN echo $BUILD_DATE +ARG BUILD_FINGERPRINT +ENV BUILD_FINGERPRINT=$BUILD_FINGERPRINT +RUN echo $BUILD_FINGERPRINT COPY --from=node /tmp/gearman-ui-master/ /app/ COPY ./docker/config/gearmanui/config.yml /app/config.yml diff --git a/docker/etc/docker-entrypoint.sh b/docker/etc/docker-entrypoint.sh index 1f879e5..ecfc881 100644 --- a/docker/etc/docker-entrypoint.sh +++ b/docker/etc/docker-entrypoint.sh @@ -13,7 +13,7 @@ export NUM_CPUS=`nproc` for f in /docker-entrypoint.init.d/*; do case "$f" in *.sh) # this should match the set of files we check for below - echo "⚙ Executing entrypoint.init file: ${f}" + echo " ⚙ Executing entrypoint.init file: ${f}" . $f break ;; @@ -23,9 +23,9 @@ done if [ "$1" = 'supervisor' ]; then EXEC="/usr/bin/supervisord -c /etc/supervisord.conf" - printf "\n${GRN}--->${NC} 🚀️️ Starting ${GRN}Gearman UI${NC} container..." - printf "\n${GRN}--->${NC} Build date: ${GRN}${BUILD_DATE}${NC}, Build version: ${GRN}${BUILD_VER}${NC}" - printf "\n${GRN}--->${NC} Exec command: ${EXEC}\n\n" + printf "\n${GRN}--->${NC} 🚀️️ Welcome to ${GRN}phplegacy Gearman UI${NC} container..." + printf "\n${GRN}--->${NC} Docker image build date: ${GRN}${BUILD_DATE}${NC}, fingerprint: ${GRN}${BUILD_FINGERPRINT}${NC}" + printf "\n${GRN}--->${NC} Subscribe to project updates: ${GRN}https://github.com/phplegacy/gearman-ui-docker${NC}\n\n" exec ${EXEC} fi diff --git a/docs/gearman-ui.png b/docs/gearman-ui.png new file mode 100644 index 0000000..8f505b2 Binary files /dev/null and b/docs/gearman-ui.png differ