Add build configuration and use it in docker compose.

This commit is contained in:
Peter Zandbergen 2026-06-18 13:26:48 +02:00
parent d8193872a9
commit b8cf7bf684
3 changed files with 10 additions and 4 deletions

2
.env Normal file
View File

@ -0,0 +1,2 @@
BUILD_TARGET=jre # native, jre
RUN_MODE=normal # native, normal

2
.gitignore vendored
View File

@ -2,4 +2,4 @@ signal-cli-config
src/main
src/signal-cli-rest-api
.idea/
./persistence
.persistence

View File

@ -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"
# - "./signal-cli-config:/home/.local/share/signal-cli"