#396  How to run OneDev in Docker with external database
Closed
Artur opened 3 years ago

Docker seems like the most optimal option allowing for a fast deployment and easy upgrade and it is our preferred way to run services. In the documentation there is no mention on how to connect external database when running from a Docker container. Can the external database be configured through system environment variables? If not, what would be the best way to setup OneDev under Docker with external database? I mean in such a way that future upgrades would require just pulling a new image and running it in place of the old onw

Robin Shen commented 3 years ago

You may pass below environments to use an external database:

EnvExample
hibernate_dialectorg.hibernate.dialect.MySQL5InnoDBDialect
hibernate_connection_driver_classcom.mysql.cj.jdbc.Driver
hibernate_connection_urljdbc:mysql://mysql:3306/onedev?serverTimezone=UTC&allowPublicKeyRetrieval=true&useSSL=false
hibernate_connection_usernameroot
hibernate_connection_passwordpassword
Robin Shen commented 3 years ago

For example value of different database types, please check conf/hibernate.properties

Robin Shen changed state to 'Closed' 3 years ago
Previous Value Current Value
Open
Closed
issue 1 of 1
Type
Question
Priority
Normal
Assignee
Issue Votes (0)
Watchers (3)
Reference
onedev/server#396
Please wait...
Page is in error, reload to recover