Travis now builds Docker and create a Github release.
Removed ActiveMQ between WebGoat and WebWolf they now act as standalone applications
This commit is contained in:
@ -1,12 +0,0 @@
|
||||
FROM openjdk:8-jre
|
||||
|
||||
RUN useradd --home-dir /home/webgoat --create-home -U webgoat
|
||||
|
||||
USER webgoat
|
||||
RUN cd /home/webgoat/; mkdir -p .webgoat
|
||||
COPY webgoat-server-8.0-SNAPSHOT.jar /home/webgoat/webgoat.jar
|
||||
COPY webwolf-8.0-SNAPSHOT.jar /home/webgoat/webwolf.jar
|
||||
COPY startup.sh /home/webgoat/startup.sh
|
||||
RUN sudo chmod +x /home/webgoat/startup.sh
|
||||
|
||||
CMD ["/home/webgoat/startup.sh"]
|
@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
java -Djava.security.egd=file:/dev/./urandom -jar /home/webgoat/webgoat.jar &
|
||||
echo "Waiting for WebGoat to start..."
|
||||
sleep 20
|
||||
java -Djava.security.egd=file:/dev/./urandom -jar /home/webgoat/webwolf.jar
|
@ -0,0 +1,40 @@
|
||||
package org.owasp.webgoat;
|
||||
|
||||
import com.mongodb.MongoClient;
|
||||
import com.mongodb.MongoClientOptions;
|
||||
import de.flapdoodle.embed.mongo.MongodExecutable;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.autoconfigure.mongo.MongoProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.core.SimpleMongoDbFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* If we run
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnProperty(value = "webgoat.embedded.mongo", havingValue = "false")
|
||||
public class ExternalMongoConfiguration {
|
||||
|
||||
@Autowired
|
||||
private MongoProperties properties;
|
||||
|
||||
@Autowired(required = false)
|
||||
private MongoClientOptions options;
|
||||
|
||||
@Bean
|
||||
public MongodExecutable mongodExecutable() throws IOException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public MongoDbFactory mongoDbFactory(Environment env) throws Exception {
|
||||
MongoClient client = properties.createMongoClient(this.options, env);
|
||||
return new SimpleMongoDbFactory(client, properties.getDatabase());
|
||||
}
|
||||
}
|
@ -39,4 +39,5 @@ public class StartWebGoat {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user