forked from box/mojito
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added config value to enable/disable Quartz scheduler. added docker c…
…ompose cluster to test API & worker nodes config
- Loading branch information
Showing
1 changed file
with
132 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
version: '2.4' | ||
name: mojito | ||
services: | ||
db: | ||
image: mysql:5.7 | ||
restart: always | ||
healthcheck: | ||
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ] | ||
interval: 5s | ||
timeout: 30s | ||
retries: 20 | ||
environment: | ||
MYSQL_ROOT_PASSWORD: ChangeMe | ||
MYSQL_DATABASE: mojito | ||
MYSQL_USER: mojito | ||
MYSQL_PASSWORD: ChangeMe | ||
command: | ||
- --character-set-server=utf8mb4 | ||
- --collation-server=utf8mb4_bin | ||
- --max-connections=1000 | ||
worker: | ||
deploy: | ||
mode: replicated | ||
replicas: 1 | ||
endpoint_mode: vip | ||
# resources: | ||
# limits: | ||
# cpus: '0.50' | ||
# memory: 500M | ||
# reservations: | ||
# cpus: '0.25' | ||
# memory: 20M | ||
healthcheck: | ||
test: [ "CMD", "curl", "localhost:8080/" ] | ||
interval: 5s | ||
timeout: 10s | ||
retries: 20 | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
api: | ||
condition: service_healthy | ||
build: | ||
dockerfile: docker/Dockerfile-bk8 | ||
context: ../ | ||
links: | ||
- db | ||
ports: | ||
- "8081:8080" | ||
restart: always | ||
environment: | ||
SPRING_APPLICATION_JSON: '{ | ||
"spring.flyway.enabled": "true", | ||
"l10n.flyway.clean" : "false", | ||
"spring.jpa.database-platform" : "org.hibernate.dialect.MySQLDialect", | ||
"spring.jpa.hibernate.ddl-auto" : "none", | ||
"spring.datasource.url" : "jdbc:mysql://db:3306/mojito?characterEncoding=UTF-8&useUnicode=true", | ||
"spring.datasource.username" : "mojito", | ||
"spring.datasource.password" : "ChangeMe", | ||
"spring.datasource.driverClassName" : "com.mysql.cj.jdbc.Driver", | ||
"spring.jpa.defer-datasource-initialization" : "false", | ||
"l10n.org.quartz.scheduler.enabled" : "true", | ||
"l10n.org.quartz.jobStore.useProperties" : "true", | ||
"l10n.org.quartz.scheduler.instanceId" : "AUTO", | ||
"l10n.org.quartz.jobStore.isClustered" : "true", | ||
"l10n.org.quartz.threadPool.threadCount" : "10", | ||
"l10n.org.quartz.jobStore.class" : "org.quartz.impl.jdbcjobstore.JobStoreTX", | ||
"l10n.org.quartz.jobStore.driverDelegateClass" : "org.quartz.impl.jdbcjobstore.StdJDBCDelegate", | ||
"l10n.org.quartz.jobStore.dataSource" : "myDS", | ||
"l10n.org.quartz.dataSource.myDS.provider" : "hikaricp", | ||
"l10n.org.quartz.dataSource.myDS.driver" : "com.mysql.jdbc.Driver", | ||
"l10n.org.quartz.dataSource.myDS.URL" : "jdbc:mysql://db:3306/mojito?characterEncoding=UTF-8&useUnicode=true", | ||
"l10n.org.quartz.dataSource.myDS.user" : "mojito", | ||
"l10n.org.quartz.dataSource.myDS.password" : "ChangeMe", | ||
"l10n.org.quartz.dataSource.myDS.maxConnections" : "12", | ||
"l10n.org.quartz.dataSource.myDS.validationQuery" : "select 1" | ||
}' | ||
api: | ||
deploy: | ||
mode: replicated | ||
replicas: 1 | ||
endpoint_mode: vip | ||
# resources: | ||
# limits: | ||
# cpus: '0.50' | ||
# memory: 500M | ||
# reservations: | ||
# cpus: '0.25' | ||
# memory: 20M | ||
healthcheck: | ||
test: [ "CMD", "curl", "localhost:8080/" ] | ||
interval: 5s | ||
timeout: 10s | ||
retries: 20 | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
build: | ||
dockerfile: docker/Dockerfile-bk8 | ||
context: ../ | ||
links: | ||
- db | ||
ports: | ||
- "8080:8080" | ||
restart: always | ||
environment: | ||
SPRING_APPLICATION_JSON: '{ | ||
"spring.flyway.enabled": "true", | ||
"l10n.flyway.clean" : "false", | ||
"spring.jpa.database-platform" : "org.hibernate.dialect.MySQLDialect", | ||
"spring.jpa.hibernate.ddl-auto" : "none", | ||
"spring.datasource.url" : "jdbc:mysql://db:3306/mojito?characterEncoding=UTF-8&useUnicode=true", | ||
"spring.datasource.username" : "mojito", | ||
"spring.datasource.password" : "ChangeMe", | ||
"spring.datasource.driverClassName" : "com.mysql.cj.jdbc.Driver", | ||
"spring.jpa.defer-datasource-initialization" : "false", | ||
"l10n.org.quartz.scheduler.enabled" : "false", | ||
"l10n.org.quartz.jobStore.useProperties" : "true", | ||
"l10n.org.quartz.scheduler.instanceId" : "AUTO", | ||
"l10n.org.quartz.jobStore.isClustered" : "true", | ||
"l10n.org.quartz.threadPool.threadCount" : "10", | ||
"l10n.org.quartz.jobStore.class" : "org.quartz.impl.jdbcjobstore.JobStoreTX", | ||
"l10n.org.quartz.jobStore.driverDelegateClass" : "org.quartz.impl.jdbcjobstore.StdJDBCDelegate", | ||
"l10n.org.quartz.jobStore.dataSource" : "myDS", | ||
"l10n.org.quartz.dataSource.myDS.provider" : "hikaricp", | ||
"l10n.org.quartz.dataSource.myDS.driver" : "com.mysql.jdbc.Driver", | ||
"l10n.org.quartz.dataSource.myDS.URL" : "jdbc:mysql://db:3306/mojito?characterEncoding=UTF-8&useUnicode=true", | ||
"l10n.org.quartz.dataSource.myDS.user" : "mojito", | ||
"l10n.org.quartz.dataSource.myDS.password" : "ChangeMe", | ||
"l10n.org.quartz.dataSource.myDS.maxConnections" : "12", | ||
"l10n.org.quartz.dataSource.myDS.validationQuery" : "select 1" | ||
}' |