jhipster / generator-jhipster-docker-compose

DO NOT USE THIS REPO - it's now a sub-generator in the main generator-jhipster project
Other
12 stars 7 forks source link

Extends database #5

Closed pascalgrimaud closed 8 years ago

pascalgrimaud commented 8 years ago

Related to https://github.com/jhipster/generator-jhipster/pull/3145 The https://github.com/jhipster/generator-jhipster-docker-compose/blob/master/generators/app/templates/_docker-compose.yml should now extends database

@wmarques @PierreBesson : let me know when you start to work on it, plz. Because, as soon as I find time, I can do it, so we won't work on the same thing

wmarques commented 8 years ago

I'm actually busy on other tasks but why doing alot of if blocks instead of putting the prodDatabaseType variable in the external-links like- "<%= baseName.toLowerCase() %>-<%= prodDatabaseType%>:<%= prodDatabaseType %>" ?

pascalgrimaud commented 8 years ago

In dev profile, there can be no database, because of H2 So as soon as someone start on this ticket, post a message here ;-)

wmarques commented 8 years ago

I'm working on it !

wmarques commented 8 years ago

@pascalgrimaud I'm facing a problem: when I try to run two mysql (for example a gateway and a microservice), they're both on 3306 by default, maybe we should ask the port of the database in the jhipster generator, as we do for the application port ?

pascalgrimaud commented 8 years ago

Yes I indicated it on one of my last comment at https://github.com/jhipster/generator-jhipster/issues/2988

IMO, the easiest way to resolve it:

wmarques commented 8 years ago

I've done this in 9b9d2f72e1f09d5ebe1c70afe035ef7d11ef813d, it works fine with mySQL and mongodb but I've got some issue with Cassandra the database seems to not startup well

pascalgrimaud commented 8 years ago

Cassandra must be started manually before the other services it's because, when you start cassandra, there is no tablespace, no table -> you have to copy cql scripts and launch them inside the container

wmarques commented 8 years ago

Oh ok, I will try this and add some info for the user after files generation ! thanks

pascalgrimaud commented 8 years ago

Look as this : http://jhipster.github.io/using-cassandra/

As we don't use an equivalent to Liquibase, database upgrades must be done manually. They are located in the src/main/resources/config/cql directory

That's why docker-compose with Cassandra is a little bit complex -> http://jhipster.github.io/docker-compose/

pascalgrimaud commented 8 years ago

done in main generator-jhipster