after running laravel-app and laravel-echo-server with docker-compose , service logs error redis service no auth but i set in laravel-echo-server.json file
can see this error
`L A R A V E L E C H O S E R V E R
version 1.6.2
Starting server...
✔ Running at localhost on port 6001
✔ Listening for http events...
[ioredis] Unhandled error event: ReplyError: NOAUTH Authentication required.
at parseError (/usr/local/share/.config/yarn/global/node_modules/redis-parser/lib/parser.js:179:12)
at parseType (/usr/local/share/.config/yarn/global/node_modules/redis-parser/lib/parser.js:302:14)
✔ Listening for redis events...
(node:1) UnhandledPromiseRejectionWarning: Redis could not subscribe.
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[ioredis] Unhandled error event: ReplyError: NOAUTH Authentication required.
at parseError (/usr/local/share/.config/yarn/global/node_modules/redis-parser/lib/parser.js:179:12)
at parseType (/usr/local/share/.config/yarn/global/node_modules/redis-parser/lib/parser.js:302:14)
[ioredis] Unhandled error event: ReplyError: NOAUTH Authentication required.`
my laravel-echo-server.json file:
{
"authHost": "127.0.0.1",
"authEndpoint": "/broadcasting/auth",
"clients": [
{
"appId": "019bd805034b881c",
"key": "a28b503fa69a04c293c20bd8e1711120"
}
],
"database": "redis",
"databaseConfig": {
"redis": {
"host":"redis",
"port":"6379",
"password":"2ye10qwNYqzmsiNwttOVbmNk0esO0ie5TVby"
},
"sqlite": {
"databasePath": "/database/laravel-echo-server.sqlite"
}
},
"devMode": true,
"host": "127.0.0.1",
"port": "6001",
"protocol": "http",
"socketio": {},
"secureOptions": 67108864,
"sslCertPath": "",
"sslKeyPath": "",
"sslCertChainPath": "",
"sslPassphrase": "",
"subscribers": {
"http": true,
"redis": true
},
"apiOriginAllow": {
"allowCors": false,
"allowOrigin": "",
"allowMethods": "",
"allowHeaders": ""
}
}
and my docker-compose file:
version: '3'
services:
#PHP Service
app-api:
build:
args:
user: devups
uid: 1000
context: ./
dockerfile: Dockerfile
image: app-api
deploy:
resources:
limits:
cpus: '0.50'
memory: 40m
container_name: app-api
restart: unless-stopped
tty: true
volumes:
- ./:/var/www
- ./docker-compose/php/local.ini:/usr/local/etc/php/conf.d/local.ini
working_dir: /var/www
ports:
- "9000:9000"
networks:
- app-net
#13 network_mode: "host"
#Nginx Service
nginx:
image: nginx:stable-alpine
# depends_on:
# - karmento-api
# - db
container_name: app-nginx
restart: unless-stopped
tty: true
ports:
- "${HTTP_PORT}:80"
- "${HTTPS_PORT}:443"
environment:
- VIRTUAL_HOST=app.test # Environment variable needed for nginx proxy
volumes:
- ./:/var/www
- ./docker-compose/nginx:/etc/nginx/conf.d
expose:
- 80
networks:
- app-net
#MySQL Service
mysql:
image: mysql:8.0.21
container_name: app-mysql
restart: unless-stopped
tty: true
ports:
- "3316:3306"
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_USER: ${DB_USERNAME}
SERVICE_TAGS: dev
SERVICE_NAME: mysql
volumes:
- ./docker-compose/mysql:/docker-entrypoint-initdb.d
- /data/mysql:/var/lib/mysql
networks:
- app-net
#Redis
redis:
image: redis:rc-alpine3.11
container_name: app-redis
ports:
- "6369:6379"
volumes:
- "/data/redis:/data"
command: redis-server --requirepass ${REDIS_PASSWORD}
networks:
- app-net
laravel-echo-server:
image: oanhnn/laravel-echo-server
container_name: laravel-echo
restart: unless-stopped
networks:
- app-net
ports:
- 6001:6001
links:
- 'redis:redis'
#Docker Networks
networks:
app-net:
external:
name: app-net
.
second issue when config and use in docker-compose file when set env in docker-compose file automatic restarting and faild please descrive how config and use in docker-compose file