Skip to content

Commit 59a011b

Browse files
First Commit
1 parent 617a6c6 commit 59a011b

File tree

7 files changed

+53
-17
lines changed

7 files changed

+53
-17
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
name: Prepare env variables
2727
run: |
2828
echo "BUILD_DATE=$(TZ=':UTC' date +'%Y-%m-%d %H:%M:%S (%Z)')" >> ${GITHUB_ENV}
29-
echo "BUILD_VER=${GITHUB_SHA::7}" >> ${GITHUB_ENV}
29+
echo "BUILD_FINGERPRINT=${GITHUB_SHA::7}" >> ${GITHUB_ENV}
3030
3131
-
3232
name: Check out code
@@ -62,10 +62,10 @@ jobs:
6262
file: ./docker/Dockerfile
6363
build-args: |
6464
BUILD_DATE=${{ env.BUILD_DATE }}
65-
BUILD_VER=${{ env.BUILD_VER }}
65+
BUILD_FINGERPRINT=${{ env.BUILD_FINGERPRINT }}
6666
tags: |
6767
legacyphp/gearman-ui:latest
68-
ghcr.io/phplegacy/gearman-ui:latest
68+
ghcr.io/phplegacy/gearman-ui-docker:latest
6969
pull: true
7070
push: true
7171

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,3 @@ logs: ## Show docker logs
2525

2626
gearman-ui:
2727
docker-compose exec gearman-ui sh
28-
29-
gearman:
30-
docker-compose exec gearman sh

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
1-
# https://github.com/phplegacy/gearman-ui-docker/
1+
# Gearman UI Docker image
22

3+
<p align="center"><a href="https://github.com/phplegacy/gearman-ui-docker"><img src="https://github.com/phplegacy/gearman-ui-docker/raw/master/docs/gearman-ui.png"></a></p>
34

45

6+
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.
57

6-
GEARMAN_SERVERS = 'Gearman#1:gearman:4730,Gearman#2:gearman2:4730';
8+
## Docker repository
9+
[Docker Hub](https://hub.docker.com/r/legacyphp/gearman-ui)
10+
`docker pull legacyphp/gearman-ui:latest`
11+
12+
[GitHub Packages](https://github.com/phplegacy/gearman-ui-docker/pkgs/container/gearman-ui-docker)
13+
`docker pull ghcr.io/phplegacy/gearman-ui-docker:latest`
14+
15+
## Usage
16+
17+
Use provided [`docker-compose.yml`](https://github.com/phplegacy/gearman-ui-docker/blob/master/docker-compose.yml) as an example.
18+
19+
## Configuration
20+
21+
Use environment variables to define gearman server name, address and port:
22+
```
23+
GEARMAN_SERVERS = 'Gearman#1:gearman:4730';
24+
```
25+
26+
Separate configuration with comma in order to connect to multiple gearman servers:
27+
```
28+
GEARMAN_SERVERS = 'Gearman#1:gearman:4730,Gearman#2:gearman2:4730';
29+
```
30+
31+
## License
32+
33+
The MIT License (MIT). Please see [License File](https://github.com/phplegacy/gearman-ui-docker/blob/master/LICENSE) for more information.
34+
35+
---
36+
If you like this project, please consider giving me a ⭐

docker-compose.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ services:
1010
restart: unless-stopped
1111
environment:
1212
- 'TZ=UTC'
13-
- 'GEARMAN_SERVERS=Gearman#1:gearman:4730,Gearman#2:gearman2:4730'
14-
- 'COMPOSE_CONVERT_WINDOWS_PATHS=1'
13+
- 'GEARMAN_SERVERS=Gearman#1:gearman:4730'
1514
networks:
1615
- network1
1716

docker/Dockerfile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM node:4-alpine as node
33

44
WORKDIR /tmp/
55
ENV NODE_ENV=production
6+
ENV NPM_CONFIG_UNSAFE_PERM=true
67

78

89
# Core utilites install
@@ -21,7 +22,6 @@ RUN set -eux \
2122

2223

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

2626
ENV TERM="xterm-256color" \
2727
LANGUAGE="en_US.UTF-8" \
@@ -81,13 +81,23 @@ ENV PATH ${PATH}:${HOME}/.composer/vendor/bin:/app/vendor/bin/
8181

8282
ENV COMPOSER_ALLOW_SUPERUSER=1
8383

84+
LABEL org.opencontainers.image.title="Gearman UI Docker image" \
85+
org.opencontainers.image.description="phplegacy Gearman UI Docker image" \
86+
org.opencontainers.image.authors="https://github.com/phplegacy/gearman-ui-docker" \
87+
org.opencontainers.image.documentation="https://github.com/phplegacy/gearman-ui-docker" \
88+
org.opencontainers.image.url="https://github.com/phplegacy/gearman-ui-docker" \
89+
org.opencontainers.image.source="https://github.com/phplegacy/gearman-ui-docker"
90+
8491
ARG TZ='UTC'
8592
ENV TZ=$TZ
93+
8694
#These params meant to be set by CI
8795
ARG BUILD_DATE
8896
ENV BUILD_DATE=$BUILD_DATE
89-
ARG BUILD_VER
90-
ENV BUILD_VER=$BUILD_VER
97+
RUN echo $BUILD_DATE
98+
ARG BUILD_FINGERPRINT
99+
ENV BUILD_FINGERPRINT=$BUILD_FINGERPRINT
100+
RUN echo $BUILD_FINGERPRINT
91101

92102
COPY --from=node /tmp/gearman-ui-master/ /app/
93103
COPY ./docker/config/gearmanui/config.yml /app/config.yml

docker/etc/docker-entrypoint.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export NUM_CPUS=`nproc`
1313
for f in /docker-entrypoint.init.d/*; do
1414
case "$f" in
1515
*.sh) # this should match the set of files we check for below
16-
echo "⚙ Executing entrypoint.init file: ${f}"
16+
echo " ⚙ Executing entrypoint.init file: ${f}"
1717
. $f
1818
break
1919
;;
@@ -23,9 +23,9 @@ done
2323
if [ "$1" = 'supervisor' ]; then
2424
EXEC="/usr/bin/supervisord -c /etc/supervisord.conf"
2525

26-
printf "\n${GRN}--->${NC} 🚀️️ Starting ${GRN}Gearman UI${NC} container..."
27-
printf "\n${GRN}--->${NC} Build date: ${GRN}${BUILD_DATE}${NC}, Build version: ${GRN}${BUILD_VER}${NC}"
28-
printf "\n${GRN}--->${NC} Exec command: ${EXEC}\n\n"
26+
printf "\n${GRN}--->${NC} 🚀️️ Welcome to ${GRN}phplegacy Gearman UI${NC} container..."
27+
printf "\n${GRN}--->${NC} Docker image build date: ${GRN}${BUILD_DATE}${NC}, fingerprint: ${GRN}${BUILD_FINGERPRINT}${NC}"
28+
printf "\n${GRN}--->${NC} Subscribe to project updates: ${GRN}https://github.com/phplegacy/gearman-ui-docker${NC}\n\n"
2929

3030
exec ${EXEC}
3131
fi

docs/gearman-ui.png

22.5 KB
Loading

0 commit comments

Comments
 (0)