Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
linenumberstrue
# create custom Dockerfile
cat <<EOF > joget-dx7dx8-postgresql-tomcat9.Dockerfile
FROM jogetworkflow/joget-dx7dx8-tomcat9:7.0.14

# Copy postgresql jdbc driver (download from https://jdbc.postgresql.org/download/postgresql-42.2.19.jar)
COPY postgresql-42.2.19.jar /deployments/apache-tomcat/lib/postgresql-42.2.19.jar
EOF

# build docker image
docker build -f joget-dx7dx8-postgresql-tomcat9.Dockerfile --rm -t quay.io/replaceWithYourAccount/joget-dx7dx8-postgresql-tomcat9:7.0.14 .

# push docker image
docker push quay.io/replaceWithYourAccount/joget-dx7dx8-postgresql-tomcat9:7.0.14

...

Obtain the pgsql file from Configure for PostgreSQL.

Code Block
languagebash
linenumberstrue
# import sql
cat jwdb-postgresql-dx7dx8.pgsql | kubectl exec -i postgres-postgresql-0 -- env PGPASSWORD=$POSTGRES_PASSWORD psql -U postgres -d jwdb

...

Follow the instructions in https://dev.joget.org/community/display/DX7dx8/Joget+on+Kubernetes, replacing the jogetworkflow/joget-dx7dx8-tomcat9 image with the custom image quay.io/replaceWithYourAccount/joget-dx7dx8-postgresql-tomcat9 in the YAML

...

Code Block
languagebash
linenumberstrue
# ssh into tomcat pod and create datasource files
kubectl exec --stdin --tty deployments/joget-dx7dx8-tomcat9 -- /bin/bash

$ cat <<EOF > /opt/joget/wflow/app_datasource-postgresql.properties
workflowUser=postgres
workflowPassword=REPLACE_POSTGRES_PASSWORD_HERE
workflowDriver=org.postgresql.Driver
workflowUrl=jdbc\:postgresql\://postgres-postgresql/jwdb
EOF

$ cat <<EOF > /opt/joget/wflow/app_datasource.properties
currentProfile=postgresql
EOF

$ exit

...

Code Block
languagebash
linenumberstrue
# restart pods

kubectl scale --replicas=0 deployment/joget-dx7dx8-tomcat9

kubectl scale --replicas=1 deployment/joget-dx7dx8-tomcat9

# view logs

kubectl logs -f deployment/joget-dx7dx8-tomcat9