If we configure the management.server.port and this one is not equal to server.port via spring.web.resources.chain.strategy.content.* generation of the hash does not work and we do not get the correct hashs on the files. If there are some information about this in docs please hint me to it. Otherwise here are an example how to reproduce it:
Id you start this docker-compose file everything will be configured for you and the hashing of the assets in /css/** e.g. does work.
Take a look at http://localhost:8080/login with the developer console in Chrome/Firefox e.g. and see that the style.css e.g. does have a hash and if we add the MANAGEMENT_SERVER_PORT=8081 we do not see the hashes.
The common.$hash.css file can be ignored this is not placed in /css/** and will be generated via webpack.
version: '2.4'
services:
mariadb:
image: mariadb:10.5
ports:
- '3308:3306'
environment:
- MYSQL_DATABASE=urlaubsverwaltung
- MYSQL_USER=urlaubsverwaltung
- MYSQL_PASSWORD=urlaubsverwaltung
- MYSQL_RANDOM_ROOT_PASSWORD=yes
mailhog:
image: mailhog/mailhog:v1.0.0
ports:
- '1025:1025'
- '8025:8025'
uv:
image: synyx/urlaubsverwaltung:latest
ports:
- '8080:8080'
environment:
- SPRING_MAIL_HOST=mailhog
- SPRING_MAIL_PORT=1025
- UV_MAIL_SENDER=test@lala.de
- UV_MAIL_ADMINISTRATOR=test@lala.de
- UV_MAIL_APPLICATION-URL=http://localhost:8080
- SPRING_DATASOURCE_URL=jdbc:mariadb://mariadb:3306/urlaubsverwaltung
- UV_SECURITY_AUTH=default
But know if I add the management.server.port the hash of /css/** files e.g. is not generated
version: '2.4'
services:
mariadb:
image: mariadb:10.5
ports:
- '3308:3306'
environment:
- MYSQL_DATABASE=urlaubsverwaltung
- MYSQL_USER=urlaubsverwaltung
- MYSQL_PASSWORD=urlaubsverwaltung
- MYSQL_RANDOM_ROOT_PASSWORD=yes
mailhog:
image: mailhog/mailhog:v1.0.0
ports:
- '1025:1025'
- '8025:8025'
uv:
image: synyx/urlaubsverwaltung:latest
ports:
- '8080:8080'
environment:
- SPRING_MAIL_HOST=mailhog
- SPRING_MAIL_PORT=1025
- UV_MAIL_SENDER=test@lala.de
- UV_MAIL_ADMINISTRATOR=test@lala.de
- UV_MAIL_APPLICATION-URL=http://localhost:8080
- SPRING_DATASOURCE_URL=jdbc:mariadb://mariadb:3306/urlaubsverwaltung
- UV_SECURITY_AUTH=default
- MANAGEMENT_SERVER_PORT=8081
The default application properties that we add in the given docker container can be seen here https://github.com/synyx/urlaubsverwaltung/blob/master/src/main/resources/application.properties#L30
Do you have any information for us, if this is a common behaviour and how we can achieve having hashed css files and split the server and management port?
Hint: This is independent from docker. I have the same behaviour via ide, 'java -jar ...' and so on :-)
If we configure the
management.server.portand this one is not equal toserver.portviaspring.web.resources.chain.strategy.content.*generation of the hash does not work and we do not get the correct hashs on the files. If there are some information about this in docs please hint me to it. Otherwise here are an example how to reproduce it:Id you start this docker-compose file everything will be configured for you and the hashing of the assets in
/css/**e.g. does work.Take a look at http://localhost:8080/login with the developer console in Chrome/Firefox e.g. and see that the
style.csse.g. does have a hash and if we add theMANAGEMENT_SERVER_PORT=8081we do not see the hashes.The
common.$hash.cssfile can be ignored this is not placed in/css/**and will be generated via webpack.But know if I add the
management.server.portthe hash of/css/**files e.g. is not generatedThe default application properties that we add in the given docker container can be seen here https://github.com/synyx/urlaubsverwaltung/blob/master/src/main/resources/application.properties#L30
Do you have any information for us, if this is a common behaviour and how we can achieve having hashed css files and split the server and management port?
Hint: This is independent from docker. I have the same behaviour via ide, 'java -jar ...' and so on :-)