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
2 changes: 1 addition & 1 deletion applications/cli/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ build/libs/yaci-cli-*-plain.jar
yaci-store-*-sources.jar
yaci-store-*-plain.jar
yaci-store-*-javadoc.jar

wallet-ui/node_modules/
21 changes: 18 additions & 3 deletions applications/cli/Earthfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
VERSION 0.8

wallet-ui-build:
FROM node:20-slim
WORKDIR /app
COPY wallet-ui/package.json wallet-ui/package-lock.json ./
RUN npm ci
COPY wallet-ui/ ./
RUN npx vite build --outDir dist
SAVE ARTIFACT dist /wallet

cli-java:
ARG EARTHLY_TARGET_NAME
ARG EARTHLY_GIT_SHORT_HASH
ARG APP_VERSION

FROM eclipse-temurin:21
COPY . .
COPY +wallet-ui-build/wallet src/main/resources/static/wallet
RUN echo git.commit.id.abbrev=${EARTHLY_GIT_SHORT_HASH} > src/main/resources/git.properties

RUN cat src/main/resources/git.properties
Expand All @@ -22,6 +32,7 @@ cli-native:

FROM ghcr.io/graalvm/graalvm-community:21
COPY . .
COPY +wallet-ui-build/wallet src/main/resources/static/wallet
RUN echo git.commit.id.abbrev=${EARTHLY_GIT_SHORT_HASH} > src/main/resources/git.properties

RUN cat src/main/resources/git.properties
Expand Down Expand Up @@ -49,8 +60,8 @@ java-setup:
docker-build:
FROM ubuntu:22.04
ENV JAVA_HOME=/opt/java/openjdk
ENV STORE_VERSION=0.1.0
ENV STORE_NATIVE_BRANCH=release/2.0.0-beta3
ENV STORE_VERSION=2.0.0
ENV STORE_NATIVE_BRANCH=release/2.0.x

ARG TARGETOS
ARG TARGETARCH
Expand Down Expand Up @@ -94,7 +105,9 @@ docker-build:
RUN mkdir -p /app/store/config
COPY docker/store-application.properties /app/store/config/application.properties

RUN wget https://github.com/bloxbean/yaci-store/releases/download/v${STORE_VERSION}/yaci-store-all-${STORE_VERSION}.jar -O /app/store/yaci-store.jar
RUN wget https://github.com/bloxbean/yaci-store/releases/download/v${STORE_VERSION}/yaci-store-${STORE_VERSION}.zip -O /app/store/yaci-store.zip
RUN unzip /app/store/yaci-store.zip -d /app/store/
RUN cp /app/store/yaci-store-${STORE_VERSION}/yaci-store.jar /app/store/yaci-store.jar

RUN echo ${APP_VERSION} > /app/version

Expand All @@ -116,6 +129,8 @@ docker-build:

RUN mkdir -p /app/config
COPY docker/application.properties /app/config/
COPY docker/plutus-costmodels-v10.json /app/config/
COPY docker/plutus-costmodels-v11.json /app/config/

ENV PATH="$PATH:/app/cardano-bin"
ENV CARDANO_NODE_SOCKET_PATH=/clusters/nodes/default/node/node.sock
Expand Down
6 changes: 4 additions & 2 deletions applications/cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies {
implementation 'org.springframework.shell:spring-shell-starter'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.ai:spring-ai-starter-mcp-server-webmvc'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.6'
implementation 'org.springframework.boot:spring-boot-starter-logging'
implementation 'org.springframework.boot:spring-boot-starter-mustache'

Expand Down Expand Up @@ -102,6 +102,7 @@ tasks.register('walletUiInstall', Exec) {
commandLine 'bash', '-c', 'npm install'
inputs.file('wallet-ui/package.json')
outputs.dir('wallet-ui/node_modules')
onlyIf { !file('src/main/resources/static/wallet/index.html').exists() }
}

tasks.register('walletUiBuild', Exec) {
Expand All @@ -114,6 +115,7 @@ tasks.register('walletUiBuild', Exec) {
inputs.file('wallet-ui/vite.config.ts')
inputs.file('wallet-ui/tailwind.config.cjs')
outputs.dir('src/main/resources/static/wallet')
onlyIf { !file('src/main/resources/static/wallet/index.html').exists() }
}

processResources {
Expand All @@ -137,7 +139,7 @@ task cliZip(type: Zip) {

from('config') {
into(configDir)
include '**/*.properties'
include '**/*.properties', '**/*.json'
}

include 'yaci-cli*'
Expand Down
3 changes: 3 additions & 0 deletions applications/cli/config/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ server.port=10000
#Default is the user_home/.yaci-cli
#yaci.cli.home=/Users/satya/yacicli

#Path to directory containing Plutus cost models JSON files (plutus-costmodels-v10.json, plutus-costmodels-v11.json)
yaci.cli.plutus-costmodels-path=./config

ogmios.enabled=false
kupo.enabled=false
yaci.store.enabled=false
Expand Down
10 changes: 5 additions & 5 deletions applications/cli/config/download.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#Please specify either the version or the full url for the following components
node.version=10.5.0
ogmios.version=6.13.0
node.version=10.6.2
ogmios.version=6.14.0
kupo.version=2.11.0

yaci.store.tag=rel-native-2.0.0-beta3
yaci.store.version=2.0.0-beta3
yaci.store.jar.version=2.0.0-beta3
yaci.store.tag=rel-native-2.0.0
yaci.store.version=2.0.0
yaci.store.jar.version=2.0.0

#node.url=
#ogmios.url=
Expand Down
4 changes: 3 additions & 1 deletion applications/cli/config/node.properties
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@
#dvtPPGovGroup=0.51f
#dvtTreasuryWithdrawal=0.51f

#committeeMinSize=0
committeeMinSize=0
ccThresholdNumerator=0
ccThresholdDenominator=1
#committeeMaxTermLength=200
#govActionLifetime=10
#govActionDeposit=1000000000
Expand Down
Loading
Loading