Move template file to root directory and add new config properties (#3)

Signed-off-by: oblom0v <johann.hoffmann@mailbox.org>
This commit is contained in:
Johann Hoffmann
2021-10-08 17:16:13 +02:00
committed by GitHub
parent 1b22fbfc5a
commit c1cba52886
3 changed files with 7 additions and 2 deletions

View File

@@ -72,7 +72,7 @@ COPY --from=builder /poco/cmake-build/lib/* /lib/
COPY --from=builder /aws-sdk-cpp/cmake-build/aws-cpp-sdk-core/libaws-cpp-sdk-core.so /lib/
COPY --from=builder /aws-sdk-cpp/cmake-build/aws-cpp-sdk-s3/libaws-cpp-sdk-s3.so /lib/
COPY owprov.properties.tmpl ${OWPROV_CONFIG}/
COPY owprov.properties.tmpl /
COPY docker-entrypoint.sh /
RUN wget https://raw.githubusercontent.com/Telecominfraproject/wlan-cloud-ucentral-deploy/main/docker-compose/certs/restapi-ca.pem \
-O /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem

View File

@@ -16,6 +16,8 @@ if [[ "$TEMPLATE_CONFIG" = 'true' && ! -f "$OWPROV_CONFIG"/owprov.properties ]];
INTERNAL_RESTAPI_HOST_CERT=${INTERNAL_RESTAPI_HOST_CERT:-"\$OWPROV_ROOT/certs/restapi-cert.pem"} \
INTERNAL_RESTAPI_HOST_KEY=${INTERNAL_RESTAPI_HOST_KEY:-"\$OWPROV_ROOT/certs/restapi-key.pem"} \
INTERNAL_RESTAPI_HOST_KEY_PASSWORD=${INTERNAL_RESTAPI_HOST_KEY_PASSWORD:-"mypassword"} \
FIRMWARE_UPDATER_UPGRADE=${FIRMWARE_UPDATER_UPGRADE:-"yes"} \
FIRMWARE_UPDATER_RCONLY=${FIRMWARE_UPDATER_RCONLY:-"no"} \
SERVICE_KEY=${SERVICE_KEY:-"\$OWPROV_ROOT/certs/restapi-key.pem"} \
SERVICE_KEY_PASSWORD=${SERVICE_KEY_PASSWORD:-"mypassword"} \
SYSTEM_DATA=${SYSTEM_DATA:-"\$OWPROV_ROOT/data"} \
@@ -35,7 +37,7 @@ if [[ "$TEMPLATE_CONFIG" = 'true' && ! -f "$OWPROV_CONFIG"/owprov.properties ]];
STORAGE_TYPE_MYSQL_PASSWORD=${STORAGE_TYPE_MYSQL_PASSWORD:-"owprov"} \
STORAGE_TYPE_MYSQL_DATABASE=${STORAGE_TYPE_MYSQL_DATABASE:-"owprov"} \
STORAGE_TYPE_MYSQL_PORT=${STORAGE_TYPE_MYSQL_PORT:-"3306"} \
envsubst < $OWPROV_CONFIG/owprov.properties.tmpl > $OWPROV_CONFIG/owprov.properties
envsubst < /owprov.properties.tmpl > $OWPROV_CONFIG/owprov.properties
fi
if [ "$1" = '/openwifi/owprov' -a "$(id -u)" = '0' ]; then

View File

@@ -25,6 +25,9 @@ openwifi.internal.restapi.host.0.cert = ${INTERNAL_RESTAPI_HOST_CERT}
openwifi.internal.restapi.host.0.key = ${INTERNAL_RESTAPI_HOST_KEY}
openwifi.internal.restapi.host.0.key.password = ${INTERNAL_RESTAPI_HOST_KEY_PASSWORD}
firmware.updater.upgrade = ${FIRMWARE_UPDATER_UPGRADE}
firmware.updater.rconly = ${FIRMWARE_UPDATER_RCONLY}
#
# Generic section that all microservices must have
#