blob: 75d23b4fb065af812378833eb25b4ad11a83fc04 [file] [log] [blame]
BjornMagnussonXA9e5a42b2021-03-08 09:54:20 +01001#!/bin/bash
2
3# ============LICENSE_START===============================================
4# Copyright (C) 2021 Nordix Foundation. All rights reserved.
5# ========================================================================
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17# ============LICENSE_END=================================================
18#
19
20# Run the producer as a docker app
21
22print_err() {
23 echo "usage: local-run.sh local|local-secure"
24}
25
26if [ $# -ne 1 ]; then
27 print_err
28 exit 1
29fi
30
31if [ $1 != "local" ] && [ $1 != "local-secure" ]; then
32 print_err
33 exit 1
34fi
35
36
37. build_and_run_env.sh $1
38
39cd app
40
41echo "When running in local mode - no callbacks from ECS or PMS are possible"
42echo "local mode is only intended for debugging code that is not dependent of callbacks"
43
44echo "Starting on port: "$PORT
45
46python3 -u rproducer.py $PORT