Skip to content

Commit

Permalink
feat(server): add support to override server config
Browse files Browse the repository at this point in the history
  • Loading branch information
fhussonnois committed May 30, 2024
1 parent 64dd232 commit 9fd862d
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 3 deletions.
21 changes: 20 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,26 @@ services:
CONNECT_PLUGIN_PATH: "/usr/local/share/kafka/plugins,/usr/share/filestream-connectors"
networks:
- kafka-platform

jikkou-server-api:
container_name: jikkou_server_api
ports:
- "8080:8080"
image: streamthoughts/jikkou-api-server:main
environment:
JIKKOU_CONFIGURATION: |
micronaut:
server:
port: 8080
jikkou:
# The extension providers
extension.providers:
# By default, disable all extensions
default.enabled: false
# Explicitly enabled/disable extensions
#<provider_name>.enabled: <boolean>
core.enabled: true
kafka.enabled: true
kafka-connect.enabled: true
networks:
kafka-platform:
driver: bridge
15 changes: 15 additions & 0 deletions server/jikkou-api-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,22 @@
<to>
<image>${docker.image.name}:${docker.image.tag}</image>
</to>
<extraDirectories>
<paths>
<path>
<from>src/main/docker</from>
<into>/</into>
</path>
</paths>
<permissions>
<permission>
<file>/entrypoint.sh</file>
<mode>755</mode>
</permission>
</permissions>
</extraDirectories>
<container>
<entrypoint>/entrypoint.sh</entrypoint>
<creationTime>USE_CURRENT_TIMESTAMP</creationTime>
<ports>
<port>28082</port>
Expand Down
4 changes: 2 additions & 2 deletions server/jikkou-api-server/src/main/config/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ micronaut:
name: jikkou-api-server
server:
# Use -1 to run on a random port
port: 28082
port: 8080

security:
enabled: false
Expand All @@ -33,7 +33,7 @@ micronaut:
# Endpoints configuration
endpoints:
all:
port: 28082
port: 8090
sensitive: false
enabled: false
health:
Expand Down
11 changes: 11 additions & 0 deletions server/jikkou-api-server/src/main/docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -e

JIKKOU_CONFIGURATION_PATH=${JIKKOU_CONFIGURATION_PATH:-"/app/resources/"}
if [ -n "${JIKKOU_CONFIGURATION}" ]; then
echo "${JIKKOU_CONFIGURATION}" > "${JIKKOU_CONFIGURATION_PATH}/application.yaml"
export MICRONAUT_CONFIG_FILES="${JIKKOU_CONFIGURATION_PATH}/application.yaml"
fi

java -cp @/app/jib-classpath-file @/app/jib-main-class-file

0 comments on commit 9fd862d

Please sign in to comment.