Anudorannador opened a new issue, #16691: URL: https://github.com/apache/dolphinscheduler/issues/16691
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened docker run with an .env file ```shell docker run -it --env-file .env apache/dolphinscheduler-standalone-server ``` and my .env: ```yml DATABASE=postgresql SPRING_DATASOURCE_URL=jdbc:postgresql://10.1.3.203:5432/dolphinscheduler SPRING_DATASOURCE_USERNAME=dolphinscheduler SPRING_DATASOURCE_PASSWORD=dolphinscheduler SPRING_JACKSON_TIME_ZONE=UTC ``` but faild end: ``` java.lang.RuntimeException: Driver org.h2.Driver claims to not accept jdbcUrl, jdbc:postgresql://10.1.3.203:5432/dolphinscheduler at com.zaxxer.hikari.util.DriverDataSource.<init>(DriverDataSource.java:110) at com.zaxxer.hikari.pool.PoolBase.initializeDataSource(PoolBase.java:331) at com.zaxxer.hikari.pool.PoolBase.<init>(PoolBase.java:114) ``` rolling from the front log and find this line: ``` [WI-0][TI-0] - 2024-10-13 06:50:11.569 INFO [main] o.a.d.StandaloneServer:[640] - The following 1 profile is active: "h2" ``` from the code [application.yaml](https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-standalone-server/src/main/resources/application.yaml#L18) line 18: ``` spring: profiles: active: h2 jackson: time-zone: UTC date-format: "yyyy-MM-dd HH:mm:ss" banner: charset: UTF-8 location: classpath:standalone-banner.txt sql: init: schema-locations: classpath:sql/dolphinscheduler_h2.sql datasource: driver-class-name: org.h2.Driver url: jdbc:h2:mem:dolphinscheduler;MODE=MySQL;DB_CLOSE_DELAY=-1;DATABASE_TO_LOWER=true username: sa password: "" ``` seems that profile still use h2 but some how the `url`, `username` and `password` had been replaced by my .env file. ### What you expected to happen the active profile should be replace by `postgresql` as the environment variable `DATABSE=postgresql`, or say, ``` # Override by profile --- spring: config: activate: on-profile: postgresql quartz: properties: org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.PostgreSQLDelegate datasource: driver-class-name: org.postgresql.Driver url: jdbc:postgresql://127.0.0.1:5432/dolphinscheduler username: root password: root ``` also in [application.yaml](https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-standalone-server/src/main/resources/application.yaml#L293) line 293. ### How to reproduce as my description. ### Anything else and I've tested that if I just changed ``` profiles: active: h2 ``` into: ``` profiles: active: postgresql ``` everything going well. no error! :) --- by the way, why I do this because I just want want to do some test but each time I modified something and re-run the docker the flows, users and datasources are gone. My request is just need a standalone version and mount out the volumes, storage persistence, but I had never used h2. Well I don't know Java neither. ### Version 3.2.x ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
