Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit a7f106b

Browse files
authored
Merge pull request #143 from appirio-tech/dev
merging dev to prod for release.
2 parents 9bfda7f + f9c43ed commit a7f106b

File tree

20 files changed

+1665
-46
lines changed

20 files changed

+1665
-46
lines changed

LOCAL_SETUP.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Create Docker Compose Env for Running Direct App Local Deployment Guide
2+
3+
## Deployment
4+
5+
```sh
6+
git clone https://github.com/appirio-tech/direct-app.git
7+
cd direct-app
8+
cp token.properties.docker-local token.properties
9+
cp topcoder_global.properties.docker-local topcoder_global.properties
10+
docker-compose up
11+
```
12+
13+
Then configure the following entry in your hosts file of your computer (NOT the docker container):
14+
15+
192.168.99.100 cockpit.cloud.topcoder.com
16+
17+
Where 192.168.99.100 is the ip address of my docker machine (launched via docker toolbox for windows or mac). If you are using linux, you can simply use 127.0.0.1 here.
18+
19+
Wait until the jboss server is ready, and then open the following link in your browser https://cockpit.cloud.topcoder.com/direct, login with heffan/password. Note that the browser will warn you about the security certificate (as it's generated by me), just ignore and proceed.

docker-compose.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: '2'
2+
services:
3+
tc-informix:
4+
image: "appiriodevops/informix:1.2"
5+
ports:
6+
- "2021:2021"
7+
tc-direct:
8+
build: ./docker/local-setup/direct-app-base
9+
#image: "tc-direct"
10+
#image: "appiriodevops/direct-app-base:latest"
11+
links:
12+
- "tc-informix"
13+
volumes:
14+
- ".:/root/direct"
15+
hostname: cockpit.cloud.topcoder.com
16+
command: sh -c "cd /root/direct && ant first_deploy && /root/jboss-4.2.3.GA/bin/run.sh -b 0.0.0.0 -Djboss.remoting.version=1"
17+
ports:
18+
- "443:443"
19+
- "8180:8180"
20+
- "1199:1199"
21+
- "1198:1198"
22+
- "3973:3973"
23+
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
FROM centos:6
2+
3+
# install tools
4+
RUN yum install -y \
5+
unzip \
6+
wget \
7+
git-all
8+
9+
WORKDIR /root
10+
11+
# install jdk7
12+
13+
RUN wget -O /root/jdk-7u79-linux-x64.rpm --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.rpm"
14+
RUN rpm -ivh jdk-7u79-linux-x64.rpm
15+
16+
# install apache-ant
17+
RUN wget -O /root/apache-ant-1.7.1-bin.zip http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.1-bin.zip
18+
RUN unzip /root/apache-ant-1.7.1-bin.zip
19+
20+
# install grails
21+
RUN wget -O /root/grails-1.3.7.zip http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-1.3.7.zip
22+
RUN unzip /root/grails-1.3.7.zip
23+
24+
# install jboss
25+
RUN wget -O /root/jboss-4.2.3.zip http://downloads.sourceforge.net/project/jboss/JBoss/JBoss-4.2.3.GA/jboss-4.2.3.GA.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fjboss%2Ffiles%2FJBoss%2FJBoss-4.2.3.GA
26+
RUN unzip /root/jboss-4.2.3.zip
27+
28+
# set env variables
29+
ENV JAVA_HOME /usr/java/jdk1.7.0_79
30+
ENV JBOSS_HOME /root/jboss-4.2.3.GA
31+
ENV GRAILS_HOME /root/grails-1.3.7
32+
ENV ANT_HOME /root/apache-ant-1.7.1
33+
ENV PATH $JAVA_HOME/bin:$GRAILS_HOME/bin:$ANT_HOME/bin:$PATH
34+
35+
# init apache-ant
36+
COPY ant-libs.tgz /root/
37+
RUN tar -xzvf /root/ant-libs.tgz -C ${ANT_HOME}/lib
38+
39+
# init grails
40+
COPY json-rest-api-1.0.8.zip ${GRAILS_HOME}/plugins/grails-json-rest-api-1.0.8.zip
41+
42+
# init jboss
43+
COPY jboss-service.xml ${JBOSS_HOME}/server/default/conf/
44+
COPY myserver.keystore ${JBOSS_HOME}/server/default/conf/
45+
COPY server.xml ${JBOSS_HOME}/server/default/deploy/jboss-web.deployer/
46+
COPY run.conf ${JBOSS_HOME}/bin/
47+
48+
# remove useless files
49+
RUN rm /root/jdk-7u79-linux-x64.rpm
50+
RUN rm /root/jboss-4.2.3.zip
51+
RUN rm /root/apache-ant-1.7.1-bin.zip
52+
RUN rm /root/grails-1.3.7.zip
53+
RUN rm /root/ant-libs.tgz
54+
55+
# create directories configured in properties file
56+
RUN mkdir /root/temp_files
57+
RUN mkdir -p /root/studiofiles/submissions
58+
59+
# expose jboss ports
60+
EXPOSE 8180 443 1199 1198 3973
61+
1.61 MB
Binary file not shown.

0 commit comments

Comments
 (0)