Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,11 @@ dependencies {

runtimeOnly('org.apache.derby:derby:10.17.1.0')
integrationTestRuntimeOnly 'org.apache.derby:derby:10.17.1.0'

// MySQL JDBC driver for Docker deployments
runtimeOnly('mysql:mysql-connector-java:8.0.33')


// PostgreSQL JDBC jar, can remove if using other databases.
runtimeOnly('org.postgresql:postgresql')

providedCompile('org.apache.tomcat.embed:tomcat-embed-jasper:9.0.11')
// https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-create-a-deployable-war-file
Expand Down
19 changes: 11 additions & 8 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,22 @@ services:
depends_on:
- "tightblog-db"
tightblog-db:
image: postgres:latest
image: mysql:8.0
environment:
# Change credentials as desired if this is intended for production use :)
POSTGRES_USER: scott
POSTGRES_PASSWORD: tiger
POSTGRES_DB: pgsqlTightBlog
MYSQL_ROOT_PASSWORD: tiger
MYSQL_DATABASE: tightblog
MYSQL_USER: scott
MYSQL_PASSWORD: tiger
expose:
- "5432"
- "3306"
ports:
# Optional, allows one to view the PostgresQL database at port 5434 with a SQL client running on the host
- "5434:5432"
# Optional, allows one to view the MySQL database at port 3307 with a SQL client running on the host
- "3307:3306"
volumes:
- tightblog-data:/var/lib/postgresql/data
- tightblog-data:/var/lib/mysql



volumes:
tightblog-data:
2 changes: 1 addition & 1 deletion docker/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:11-jdk
FROM openjdk:25-jdk

COPY docker/web/application-tbcustom.properties application-tbcustom.properties

Expand Down
4 changes: 2 additions & 2 deletions docker/web/application-tbcustom.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ mail.enabled=false
#spring.mail.username=xxxx@gmail.com
#spring.mail.password=yyyy

spring.datasource.url=jdbc:postgresql://tightblog-db:5432/pgsqlTightBlog
spring.datasource.url=jdbc:mysql://tightblog-db:3306/tightblog?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC
spring.datasource.username=scott
spring.datasource.password=tiger
spring.datasource.driverClassName=org.postgresql.Driver
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver

# TightBlog requires SSL, to support that, create a keystore and place
# in the directory of this file and configure its properties below.
Expand Down
5 changes: 1 addition & 4 deletions etc/sqlgen/src/main/groovy/genDDL.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,5 @@ genScript("mysql", "true", "text",
"tinyint(1) default 0", "tinyint(1) default 1",
"datetime(3)", "datetime(3) default CURRENT_TIMESTAMP(3)")

// source for foreignKeyIndex val: http://www.postgresql.org/docs/9.1/static/ddl-constraints.html
genScript("postgresql", "false", "text",
"boolean default false", "boolean default true",
"timestamp(3) with time zone", "timestamp(3) default now()")


247 changes: 0 additions & 247 deletions src/main/resources/dbscripts/postgresql-createdb.sql

This file was deleted.