From b8cf7bf684a5508563f532eee91dcbb8544d9cb7 Mon Sep 17 00:00:00 2001 From: Peter Zandbergen Date: Thu, 18 Jun 2026 13:26:48 +0200 Subject: [PATCH] Add build configuration and use it in docker compose. --- .env | 2 ++ .gitignore | 2 +- docker-compose.yml | 10 +++++++--- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..26a8ac9 --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +BUILD_TARGET=jre # native, jre +RUN_MODE=normal # native, normal diff --git a/.gitignore b/.gitignore index 3380c9f..eb6101e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ signal-cli-config src/main src/signal-cli-rest-api .idea/ -./persistence +.persistence diff --git a/docker-compose.yml b/docker-compose.yml index 1434881..383f166 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,13 @@ services: # JRE variant (default) -- use with MODE=normal or MODE=json-rpc signal-cli-rest-api: - image: bbernhard/signal-cli-rest-api:latest + # image: bbernhard/signal-cli-rest-api:latest + build: + context: "." + dockerfile: Dockerfile + target: ${BUILD_TARGET} environment: - - MODE=normal #supported modes: normal, json-rpc + - MODE=${RUN_MODE} #supported modes: normal, json-rpc #- AUTO_RECEIVE_SCHEDULE=0 22 * * * #enable this parameter on demand (see description below) ports: - "8080:8080" #map docker port 8080 to host port 8080. @@ -19,4 +23,4 @@ services: # ports: # - "8080:8080" # volumes: - # - "./signal-cli-config:/home/.local/share/signal-cli" \ No newline at end of file + # - "./signal-cli-config:/home/.local/share/signal-cli"