forked from rAlvaPrincipe/ews_events
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-fully compatible with ew-shopp/ingestion_lib
- Loading branch information
Showing
8 changed files
with
136 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
FROM openjdk:8-jre-alpine | ||
|
||
ENV JAVA_OPTS="-XX:+HeapDumpOnOutOfMemoryError -Xmx512m -Xmx256m" | ||
ENV ARANGO_HOST="arangodb" | ||
ENV ARANGO_PORT=8529 | ||
ENV ARANGO_USER="root" | ||
ENV ARANGO_DB_NAME="arango-demo" | ||
ENV ARANGO_PASSWORD="root" | ||
ENV REMOTE_API_ENDPOINT="http://conciliator:8080/reconcile/" | ||
RUN apk add --update bash && rm -rf /var/cache/apk/* | ||
|
||
ADD *.jar /app.jar | ||
RUN mkdir code | ||
ADD *.jar /code/app.jar | ||
COPY ./bash_scripts /code | ||
COPY ./common_scripts /code | ||
|
||
RUN sh -c 'touch /app.jar' | ||
RUN sh -c 'touch /code/app.jar' | ||
|
||
EXPOSE 8080 | ||
CMD java -Djava.security.egd=file:/dev/./urandom -jar /app.jar | ||
ENTRYPOINT ["/code/main.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
# arg1: run_file_name | ||
# arg2: retry_max_count | ||
# arg3: code directory | ||
# arg4: input directory | ||
# arg5: work directory | ||
# arg6: output directory | ||
|
||
code_directory=${3} | ||
input_directory=${4} | ||
work_directory=${5} | ||
output_directory=${6} | ||
|
||
echo "code_directory: ${code_directory}" | ||
echo "input_directory: ${input_directory}" | ||
echo "work_directory: ${work_directory}" | ||
echo "output_directory: ${output_directory}" | ||
|
||
echo "checking configuration file in input directory" | ||
nconfFiles="$(find "${input_directory}" -name "*.properties" | wc -l | tr -d '[:space:]' )" | ||
if [[ "${nconfFiles}" -gt "0" ]]; then | ||
# Extract File Name in random pos | ||
file_num=`shuf -i1-${nconfFiles} -n1` | ||
config_file="$(find "${input_directory}" -name "*.properties" | head "-${file_num}" | tail -1)" | ||
echo "// Found ${nconfFiles} Files" | ||
echo "// Picking the configuration file num ${file_num}" | ||
echo "// File to process ${config_file}" | ||
fi | ||
|
||
echo '***' | ||
echo '#' | ||
echo '# Starting Process: ...' | ||
echo '#' | ||
|
||
# Do processing here | ||
echo " Starting java application" | ||
echo "Running: java -jar ${code_directory}/app.jar --working_path=${work_directory} --spring.config.location=file:///${config_file} --results_dir=run" | ||
java -Djava.security.egd=file:/dev/./urandom -jar ${code_directory}/app.jar --working_path=${work_directory} --spring.config.location=file:///${config_file} --results_dir=run | ||
|
||
|
||
# Move the file(s) to output | ||
${code_directory}/move_to_output.sh ${output_directory} ${work_directory}/run/* | ||
|
||
rm -rf ${work_directory}/run | ||
|
||
echo '#' | ||
echo '# End Process' | ||
echo '#' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,8 @@ | ||
version: '3.7' | ||
services: | ||
arangodb: | ||
container_name: arangodb | ||
image: arangodb:latest | ||
restart: always | ||
environment: | ||
- ARANGO_ROOT_PASSWORD=openSesame | ||
# - ARANGO_RANDOM_ROOT_PASSWORD=1 | ||
# - ARANGO_NO_AUTH=0 | ||
ports: | ||
- 8529:8529 | ||
volumes: | ||
- ../../../arangodb:/var/lib/arangodb3 | ||
app: | ||
image: miciav/eventsdownloader:0.1 | ||
environment: | ||
- ARANGO_HOST=arangodb | ||
- ARANGO_USER=root | ||
- ARANGO_PASSWORD=openSesame | ||
- ARANGO_EVENTS=events | ||
- API=https://cep.cocos.si/nodeproxy/cep/v1/customEvents/event/ | ||
expose: | ||
- 8080 | ||
depends_on: | ||
- arangodb | ||
volumes: | ||
- ./input:/input | ||
- ./output:/output | ||
command: ["0", "code", "input", "work", "output"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
version: '3.7' | ||
services: | ||
arangodb: | ||
container_name: arangodb | ||
image: arangodb:latest | ||
restart: always | ||
environment: | ||
- ARANGO_ROOT_PASSWORD=openSesame | ||
# - ARANGO_RANDOM_ROOT_PASSWORD=1 | ||
# - ARANGO_NO_AUTH=0 | ||
ports: | ||
- 8529:8529 | ||
volumes: | ||
- ../../../arangodb:/var/lib/arangodb3 | ||
app: | ||
image: miciav/eventsdownloader:0.1 | ||
environment: | ||
- ARANGO_HOST=arangodb | ||
- ARANGO_USER=root | ||
- ARANGO_PASSWORD=openSesame | ||
- ARANGO_EVENTS=events | ||
- API=https://cep.cocos.si/nodeproxy/cep/v1/customEvents/event/ | ||
expose: | ||
- 8080 | ||
depends_on: | ||
- arangodb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters