Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ejercicio2-framework-back
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Josue
ejercicio2-framework-back
Commits
836b9b9c
Commit
836b9b9c
authored
Jan 17, 2022
by
Cristian Aguirre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MessageMapper SessionMapper Dockerfile
parent
589cb33c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
16 deletions
+36
-16
Dockerfile
Dockerfile
+5
-6
Dockerfile_Volume
Dockerfile_Volume
+15
-0
entrypoint.sh
entrypoint.sh
+10
-0
MessageMapper.xml
.../resources/config/mappers/bytebot/mysql/MessageMapper.xml
+0
-2
SessionMapper.xml
.../resources/config/mappers/bytebot/mysql/SessionMapper.xml
+3
-3
MessageMapper.xml
...sources/config/mappers/bytebot/postgres/MessageMapper.xml
+0
-2
SessionMapper.xml
...sources/config/mappers/bytebot/postgres/SessionMapper.xml
+3
-3
No files found.
Dockerfile
View file @
836b9b9c
...
...
@@ -9,13 +9,12 @@ RUN apk add --update curl && \
RUN
export
JAVA_HOME
=
$(
readlink
-f
/usr/bin/java |
sed
"s:/bin/java::"
)
RUN
export
PATH
=
$JAVA_HOME
/bin:
$PATH
VOLUME
/tmp
ARG
JAR_FILE
RUN
echo
${
JAR_FILE
}
COPY
${JAR_FILE} app.jar
ENV
JAVA_OPTS="-Xms512m -Xmx1024m"
# VOLUME /tmp
RUN
echo
'target/bytebot-service-1.0.1-SNAPSHOT.jar'
COPY
'target/bytebot-service-1.0.1-SNAPSHOT.jar' app.jar
# ENV JAVA_OPTS="-Xms512m -Xmx1024m"
EXPOSE
8080
EXPOSE
8443
EXPOSE
22
ENTRYPOINT
[ "sh", "-c", "java
$JAVA_OPTS
-Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]
ENTRYPOINT
[ "sh", "-c", "java -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]
Dockerfile_Volume
0 → 100644
View file @
836b9b9c
FROM python:3.8-slim
USER root
COPY . .
RUN apt update && \
apt install -y nano curl awscli
RUN chmod +x entrypoint.sh
RUN mkdir /data
VOLUME [ "/data" ]
CMD ["sh","entrypoint.sh"]
\ No newline at end of file
entrypoint.sh
0 → 100644
View file @
836b9b9c
#!/bin/bash
aws s3
sync
s3://
$bucket$path
/data/
$directory
/
while
:
do
echo
"Container is still running"
sleep
5
done
\ No newline at end of file
src/main/resources/config/mappers/bytebot/mysql/MessageMapper.xml
View file @
836b9b9c
...
...
@@ -8,14 +8,12 @@
SELECT COUNT(MESSA_ID)
FROM AVB_MESSAGE
WHERE MESSA_DATE
<
= #{endDate} AND MESSA_DATE
>
= #{startDate}
and INTEN_ID IS NOT NULL
</select>
<select
id=
"countMessagesInRangeForHour"
resultType=
"int"
flushCache=
"true"
>
SELECT COUNT(MESSA_ID)
FROM AVB_MESSAGE
WHERE MESSA_DATE
<
= #{endDate} AND MESSA_DATE
>
= #{startDate}
and INTEN_ID IS NOT NULL
</select>
<!-- @TODO Pendiente agregar la fecha -->
...
...
src/main/resources/config/mappers/bytebot/mysql/SessionMapper.xml
View file @
836b9b9c
...
...
@@ -14,8 +14,8 @@
<select
id=
"countSessionsInRange"
resultType=
"int"
flushCache=
"true"
>
select count(session_id) from avb_session
WHERE SESSION_
LEDAT
<
= #{endDate}
AND SESSION_
LEDAT
>
= #{startDate}
WHERE SESSION_
DATE
<
= #{endDate}
AND SESSION_
DATE
>
= #{startDate}
</select>
<select
id=
"avgSessionsByCustomerInRange"
resultType=
"Double"
flushCache=
"true"
>
...
...
@@ -23,7 +23,7 @@
(
select count(USER_ID) as SESSION_CANT
from AVB_SESSION bas
WHERE SESSION_
LEDAT
<
= #{endDate} AND SESSION_LEDAT
>
= #{startDate} GROUP BY USER_ID
WHERE SESSION_
DATE
<
= #{endDate} AND SESSION_DATE
>
= #{startDate} GROUP BY USER_ID
) AVB_SESSION_COUNT
</select>
...
...
src/main/resources/config/mappers/bytebot/postgres/MessageMapper.xml
View file @
836b9b9c
...
...
@@ -8,14 +8,12 @@
SELECT COUNT(MESSA_ID)
FROM AVB_MESSAGE
WHERE MESSA_DATE
<
= #{endDate} AND MESSA_DATE
>
= #{startDate}
and INTEN_ID IS NOT NULL
</select>
<select
id=
"countMessagesInRangeForHour"
resultType=
"int"
flushCache=
"true"
>
SELECT COUNT(MESSA_ID)
FROM AVB_MESSAGE
WHERE MESSA_DATE
<
= #{endDate} AND MESSA_DATE
>
= #{startDate}
and INTEN_ID IS NOT NULL
</select>
<!-- @TODO Pendiente agregar la fecha -->
...
...
src/main/resources/config/mappers/bytebot/postgres/SessionMapper.xml
View file @
836b9b9c
...
...
@@ -14,8 +14,8 @@
<select
id=
"countSessionsInRange"
resultType=
"int"
flushCache=
"true"
>
select count(session_id) from avb_session
WHERE SESSION_
LEDAT
<
= #{endDate}
AND SESSION_
LEDAT
>
= #{startDate}
WHERE SESSION_
DATE
<
= #{endDate}
AND SESSION_
DATE
>
= #{startDate}
</select>
<select
id=
"avgSessionsByCustomerInRange"
resultType=
"Double"
flushCache=
"true"
>
...
...
@@ -23,7 +23,7 @@
(
select count(USER_ID) as SESSION_CANT
from AVB_SESSION bas
WHERE SESSION_
LEDAT
<
= #{endDate} AND SESSION_LEDAT
>
= #{startDate} GROUP BY USER_ID
WHERE SESSION_
DATE
<
= #{endDate} AND SESSION_DATE
>
= #{startDate} GROUP BY USER_ID
) AVB_SESSION_COUNT
</select>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment