To build, you should have installed jdk7 and maven3
- Run
./install-third-dep.sh
to install all dependence - Rename
token.properties.docker
totoken.properties
in the source directory - Run
mvn clean package -DskipTests=true
to build ear package
NOTE: the ear file is in the ear-web/target/
In this configuration, we'll run the direct app in a docker container locally but it unfortunately requires many dependencies so we'll need to run several containers and connect to the dev database. To run, follow these steps.
NOTE: it is assumed you are running with the latest Docker toolbox and Docker compose (1.5+)
- Add this entry to your local /etc/hosts file:
<docker ip> docker.topcoder-dev.com
. This is needed for auth integration that requires the same top level domain. You can get the docker ip with the commanddocker-machine ip default
- Set the following environment variables:
- TC_DEV_NAT_DIR : Local directory containing the pem file for accessing the dev NAT instance (used to create a tunnel to the dev informix instances)
- TC_DIRECT_SRC_HOME : Local directory for the root direct-app directory
-
Run
docker-compose up
from theroot dir
containing thedocker-compose.yml
fileThis will start the app with an endpoint available on port 443. You can now go to https://docker.topcoder-dev.com/direct/allProjects.action
NOTE: the SSL certificate is self-signed as will generate a warning/error when you access the site for the first time. Just accept it and continue.
direct_user/topcoder2001 (Use this user to login to Direct and create challenges in the Topcoder DEV environment. You can alsoo use this user to manipulate challenges in Online Review).
Setup on Local env - Refer to http://apps.topcoder.com/wiki/display/docs/TC+Direct+Setup+Guide
- Instead of using SVN, you will use the codes from this git repo
VM Info:
- http://apps.topcoder.com/wiki/display/projects/Direct+VM
- http://apps.topcoder.com/wiki/display/docs/VM+Image+2.5
Build/Compile
- run 'ant deploy'
Deploy:
- simply run 'ant deploy' to build all the components and the direct and deploy the direct to jboss
- Change
src/java/main
tosrc/main/java
,src/java/test
tosrc/test/java
for all java modules - Add
install-third-dep.sh
to install all dependence - Add
pom.xml
to every java module - Using
maven build
andmaven-resources-plugin
to build target file - Move
root/src
toroot/app/src
to builddirect.war
file - Add
ear-web
to builddirect.ear
and other packages that need to move to jboss - Add
Dockerfile
,docker-compose.yml
to root dir