Skip to content

Commit

Permalink
Update docker build and liquibase dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
buehlefs committed Oct 29, 2024
1 parent e5d022e commit b0bd696
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
FROM eclipse-temurin:17 AS builder
FROM eclipse-temurin:21 AS builder

RUN apt-get -y update && apt-get install unzip
WORKDIR /app

# install ballerina
ARG BAL_VERSION="2201.8.6"
ARG BAL_VERSION="2201.10.2"
RUN wget --no-verbose https://dist.ballerina.io/downloads/${BAL_VERSION}/ballerina-${BAL_VERSION}-swan-lake.zip
RUN unzip ballerina-${BAL_VERSION}-swan-lake
RUN unzip -q ballerina-${BAL_VERSION}-swan-lake
ENV PATH="${PATH}:/app/ballerina-${BAL_VERSION}-swan-lake/bin"

# install liquibase
RUN wget --no-verbose https://github.com/liquibase/liquibase/releases/download/v4.11.0/liquibase-4.11.0.zip
RUN unzip liquibase-4.11.0.zip -d /app/liquibase
RUN wget --no-verbose https://github.com/liquibase/liquibase/releases/download/v4.29.2/liquibase-4.29.2.zip
RUN unzip -q liquibase-4.29.2.zip -d /app/liquibase

# copy files
COPY . /app

RUN bal build --observability-included

FROM eclipse-temurin:17-jre
FROM eclipse-temurin:21-jre

LABEL org.opencontainers.image.source="https://github.com/UST-QuAntiL/qhana-backend"

RUN apt-get -y update && apt-get install -y sqlite3 unzip zip
RUN apt-get -y update && apt-get install -y sqlite3 unzip zip && rm -rf /var/lib/apt/lists/*

WORKDIR /app

Expand Down
3 changes: 2 additions & 1 deletion start-docker.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/sh
LIQUIBASE_HUB_MODE=OFF

# prepare sqlite database
liquibase --url=jdbc:sqlite:qhana-backend.db --classpath=/app --driver=org.sqlite.JDBC --changelog-file=changelog.xml --secure-parsing=false --hub-mode=off updateTestingRollback
liquibase --url=jdbc:sqlite:qhana-backend.db --classpath=/app --driver=org.sqlite.JDBC --changelog-file=changelog.xml --secure-parsing=false updateTestingRollback

# insert env var for mariadb liquibase config
cat << EOF > /app/liquibase.properties
Expand Down
4 changes: 2 additions & 2 deletions update-sqlite-db.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

# get sqlite driver for liquibase
JDBC=lib/sqlite-jdbc-3.36.0.3.jar
JDBC=lib/sqlite-jdbc-3.46.1.3.jar
if [ ! -f "$JDBC" ]; then
wget -P lib https://github.com/xerial/sqlite-jdbc/releases/download/3.36.0.3/sqlite-jdbc-3.36.0.3.jar
wget -P lib https://github.com/xerial/sqlite-jdbc/releases/download/3.46.1.3/sqlite-jdbc-3.46.1.3.jar
fi

# set up db or deploy db changes
Expand Down

0 comments on commit b0bd696

Please sign in to comment.