Open bright-coder opened 4 years ago
I made it worker like this:
Dockerfile.worker
FROM golang:1.12-alpine
RUN apk add --update git;
RUN go get github.com/gocraft/work/cmd/workwebui && \
go install github.com/gocraft/work/cmd/workwebui
CMD workwebui -redis="$REDIS_HOSTS" -ns="work" -listen="0.0.0.0:8181"
docker-compose.yml
version: '3.5'
services:
redis:
container_name: redis
image: redis
expose:
- 6379
redis-commander:
container_name: redis-commander
image: rediscommander/redis-commander:latest
restart: always
environment:
- REDIS_HOSTS=local:redis:6379
ports:
- "8081:8081"
workerui:
restart: always
environment:
- REDIS_HOSTS=redis://redis:6379
build:
context: .
dockerfile: Dockerfile.worker
ports:
- "8181:8181"
docker-compose up --build redis workerui redis-commander
Hope it will works also on your machine, I've been struggling the same way as you! 😄
docker-compose.yml
In workerui Dockerfile
I got a message.
ERROR: worker_observations.worker_pool_heartbeats - invalid redis URL, url is opaque: redis:6379