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
8e2cd9d8
Commit
8e2cd9d8
authored
Sep 16, 2020
by
huriarte
Browse files
Options
Browse Files
Download
Plain Diff
Merge origin/developer into developer
parents
ce3f146f
dbde9581
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
1 deletion
+82
-1
Dockerfile
Dockerfile
+20
-0
pom.xml
pom.xml
+58
-0
SFTPRoute.java
src/main/java/com/bytesw/bytebot/routes/SFTPRoute.java
+4
-1
No files found.
Dockerfile
0 → 100644
View file @
8e2cd9d8
FROM
java:openjdk-8-jdk-alpine
MAINTAINER
schicoma@bytesw.com
USER
root
#RUN yum -y install java-1.8.0-openjdk
RUN
apk add
--update
curl
&&
\
rm
-rf
/var/cache/apk/
*
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
COPY
${JAR_FILE} 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" ]
pom.xml
View file @
8e2cd9d8
...
@@ -304,6 +304,64 @@
...
@@ -304,6 +304,64 @@
</build>
</build>
<profiles>
<profiles>
<profile>
<id>
docker
</id>
<activation>
<property>
<name>
docker
</name>
</property>
</activation>
<properties>
<packaging.type>
jar
</packaging.type>
</properties>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-undertow
</artifactId>
</dependency>
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
javax.servlet-api
</artifactId>
</dependency>
<dependency>
<groupId>
org.glassfish.tyrus
</groupId>
<artifactId>
tyrus-spi
</artifactId>
<version>
1.15
</version>
</dependency>
<dependency>
<groupId>
org.glassfish.tyrus
</groupId>
<artifactId>
tyrus-core
</artifactId>
<version>
1.15
</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
com.spotify
</groupId>
<artifactId>
dockerfile-maven-plugin
</artifactId>
<version>
1.3.6
</version>
<executions>
<execution>
<id>
default
</id>
<goals>
<goal>
build
</goal>
</goals>
</execution>
</executions>
<configuration>
<repository>
${docker.image.prefix}/${docker.image.name}
</repository>
<tag>
${project.version}
</tag>
<buildArgs>
<JAR_FILE>
target/${project.build.finalName}.jar
</JAR_FILE>
</buildArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<profile>
<id>
default
</id>
<id>
default
</id>
<activation>
<activation>
...
...
src/main/java/com/bytesw/bytebot/routes/SFTPRoute.java
View file @
8e2cd9d8
...
@@ -19,10 +19,13 @@ public class SFTPRoute extends RouteBuilder {
...
@@ -19,10 +19,13 @@ public class SFTPRoute extends RouteBuilder {
@Value
(
"${application.bytebot-integration.ftp.host}"
)
@Value
(
"${application.bytebot-integration.ftp.host}"
)
private
String
host
;
private
String
host
;
@Value
(
"${application.bytebot-integration.ftp.passiveMode:true}"
)
private
boolean
passiveMode
;
@Override
@Override
public
void
configure
()
throws
Exception
{
public
void
configure
()
throws
Exception
{
from
(
"direct:transferFile"
)
from
(
"direct:transferFile"
)
.
toF
(
"ftp://%s@%s/%s?password=%s&binary=true
"
,
username
,
host
,
directory
,
password
)
.
toF
(
"ftp://%s@%s/%s?password=%s&binary=true
&passiveMode=%s"
,
username
,
host
,
directory
,
password
,
passiveMode
)
.
log
(
"Transfered file .${file:name} "
);
.
log
(
"Transfered file .${file:name} "
);
}
}
}
}
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