Skip to content

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-tebiev committed Dec 10, 2022
1 parent 617a6c6 commit 408798e
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,3 @@ logs: ## Show docker logs

gearman-ui:
docker-compose exec gearman-ui sh

gearman:
docker-compose exec gearman sh
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# 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';
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ services:
environment:
- 'TZ=UTC'
- 'GEARMAN_SERVERS=Gearman#1:gearman:4730,Gearman#2:gearman2:4730'
- 'COMPOSE_CONVERT_WINDOWS_PATHS=1'
networks:
- network1

Expand Down
16 changes: 13 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,7 +22,6 @@ RUN set -eux \


FROM php:5.6-fpm-alpine as php
LABEL org.opencontainers.image.source=https://github.com/phplegacy/gearman-ui-docker

ENV TERM="xterm-256color" \
LANGUAGE="en_US.UTF-8" \
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions docker/etc/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand All @@ -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
Expand Down

0 comments on commit 408798e

Please sign in to comment.