JAVA_OPTS doesn't seem to be working
RulerOf opened this issue · 3 comments
RulerOf commented
My setup
- Host OS: Oracle Linux 7
- Log output (probably unhelpful).
- Obtained with
grep -v liquibase ./airsonic/config/airsonic.log
to filter out noise.
- Obtained with
-
No volume mount symlinks
-
docker-compose
.env
:
DOMAIN=mydomain.com
TZ=America/New_York
PGID=1000
- portion of
docker-compose.yml
:
airsonic:
depends_on:
- traefik
- plex
image: linuxserver/airsonic:latest
container_name: airsonic
hostname: airsonic
restart: unless-stopped
volumes:
- ./airsonic/config:/config
- /storage/media/music:/music
- ./airsonic/playlists:/playlists
- /storage/media/podcasts:/podcasts
environment:
- PGID
- PUID=1006
- TZ
- JAVA_OPTS="-Dserver.use-forward-headers=true"
labels:
traefik.enable: "true"
traefik.port: "4040"
traefik.frontend.rule: "Host:airsonic.${DOMAIN}"
com.centurylinklabs.watchtower.enable: "true"
Details
It doesn't seem that JAVA_OPTS is being honored in this container, and looking at the run file doesn't show it referenced in there anywhere.
After bringing up the container on my system, I check my running processes and anything in the JAVA_OPTS
environment variable doesn't get added to the java process's command line:
[root@drew-metal content-engine]# docker-compose start airsonic
Starting airsonic ... done
[root@drew-metal content-engine]# ps aux | grep airsonic
root 2022 0.0 0.0 192 4 ? S 18:56 0:00 s6-supervise airsonic
airsonic 2025 12.6 2.0 28474880 1991972 ? Ssl 18:56 2:56 java -Dorg.eclipse.jetty.annotations.maxWait=1800 -Dairsonic.home=/config -Dairsonic.defaultMusicFolder=/music -Dairsonic.defaultPodcastFolder=/podcasts -Dairsonic.defaultPlaylistFolder=/playlists -jar /usr/share/java/jetty-runner.jar --host 0.0.0.0 --port 4040 --path / airsonic.war
root 21698 0.0 0.0 112672 2264 pts/3 S+ 19:19 0:00 grep --color=auto airsonic
[root@drew-metal content-engine]#
RulerOf commented
I had to remove the quotes from the JAVA_OPTS
to make the container work after applying #9
tobbenb commented
Looks like we forgot to add JAVA_OPTS to the run command. Thanks for notifying us. I'll do an inhouse PR to make the variable available in another way. Something to do with linting I think.