docker env "PSN_ACCOUNTS" mandatory
See original GitHub issueDescription of the issue
Hello, upgrading from 0.7.1 to 1.0.1 (HA Core) yields an error.
After adding ENV PSN_ACCOUNTS
everything works as expected 👍
ps5-mqtt:
container_name: ps5-mqtt
image: ghcr.io/funkeyflo/ps5-mqtt/amd64
volumes:
- /volume1/docker/ps5-mqtt:/config
network_mode: host
entrypoint: /config/run.sh
environment:
- MQTT_HOST=${MQTT_HOST}
- DEVICE_CHECK_INTERVAL=5000
- DEVICE_DISCOVERY_INTERVAL=60000
- INCLUDE_PS4_DEVICES=false
- FRONTEND_PORT=8645
- CREDENTIAL_STORAGE_PATH=/config/credentials.json
- 'PSN_ACCOUNTS=[{"username": "PSN", "npsso":"${NPSSO}"}]' # <- mandatory
- ACCOUNT_CHECK_INTERVAL=5000
- DEBUG=@ha:ps5:*
restart: always
Addon version
1.0.1
Platform
Home Assistant 2022.8.6 Frontend-version: 20220802.0 - latest
Logs of the issue (if applicable)
SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse (<anonymous>)
at Object.<anonymous> (/app/server/dist/index.js:81:25)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47
Starting PS5-MQTT...
undefined:1
undefined
^
Issue Analytics
- State:
- Created a year ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Require environment variables to be given to image when run ...
Is there a way that docker [container] run checks that an environment variable is given to the container before starting it. docker ......
Read more >Add mandatory environment variables to docker compose file
I propose that we add CMD_DOMAIN to the docker compose file. ... Add mandatory environment variables to docker compose file #189.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ah, the regular HA add-on
.sh
script handles thenull
value normally. But that obviously doesn’t work for docker installs.I’ll add a check to the server as well when I get back from holiday.
For now a workaround would be to use the following value when not supplying PSN accounts:
Hi there, I still get the
error config could not be read from 'undefined'
Full log below:
my
docker-compose.yaml
my
config/options.json