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

Support For Mock Services #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions docker/direct-app/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,23 @@ RUN yum install -y \
wget \
dos2unix

WORKDIR /root
# install jdk7

RUN cd /opt/ \
&& wget --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.tar.gz" \
&& tar xzf jdk-7u79-linux-x64.tar.gz \
&& rm -rf jdk-7u79-linux-x64.tar.gz
# Oracle has blocked direct download link, right now we only can do manual download this file below ( jdk 7 linux 64-bit format tar.gz)
# http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html
# and
# put in this current directory with name: jdk7.tar.gz
#
#
#RUN cd /opt/ \
# && wget --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.tar.gz" \
# && tar xzf jdk-7u79-linux-x64.tar.gz \
# && rm -rf jdk-7u79-linux-x64.tar.gz

COPY jdk7.tar.gz /root/
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deedee missing this file.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have to manually download from oracle. Put it on build directory and rename it as jdk7.tar.gz

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's too big to include it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deedee currently, there is no way to download on the fire anymore?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find any trusted source

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from official oracle I think no

RUN tar xvfz /root/jdk7.tar.gz -C /opt && mv -f /opt/jdk* /opt/jdk7 && rm -rf /root/jdk7.tar.gz

WORKDIR /root

# install apache-ant
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 \
Expand All @@ -26,8 +35,8 @@ RUN wget -O /root/grails-1.3.7.zip http://dist.springframework.org.s3.amazonaws.
&& rm /root/grails-1.3.7.zip

# set env variables
ENV JAVA_HOME=/opt/jdk1.7.0_79
ENV JRE_HOME=/opt/jdk1.7.0_79/jre
ENV JAVA_HOME=/opt/jdk7
ENV JRE_HOME=/opt/jdk7/jre

ENV GRAILS_HOME /root/grails-1.3.7
ENV ANT_HOME /root/apache-ant-1.7.1
Expand Down Expand Up @@ -58,4 +67,4 @@ RUN mkdir -p /root/studiofiles/submissions
WORKDIR /root/jboss-4.2.3.GA/bin

# expose jboss ports
EXPOSE 8180 443 1198 1199 3973 5446
EXPOSE 8180 443 1198 1199 3973 5446
2 changes: 1 addition & 1 deletion docker/direct-app/build/config/token.properties
Original file line number Diff line number Diff line change
Expand Up @@ -358,4 +358,4 @@
@ApplicationServer.JWT_COOKIE_KEY@=tcjwt_vm
@ApplicationServer.DIRECT_API_SERVICE_ENDPOINT@= direct.dev.topcoder.com/direct/api/v2/


@memberSearchApiUrl@=https://tc-api.cloud.topcoder.com:8443/v3/members/_search/?query=MEMBER_SEARCH&offset=0&limit=10
7 changes: 6 additions & 1 deletion docker/direct-app/build/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ cp -f /root/config/run.conf /data/jboss-4.2.3.GA/bin/
cp -f /root/scripts/start.sh /data/jboss-4.2.3.GA/bin/

# copy properties files to mounted direct volume (/root/direct)
cp -f /root/config/token.properties /root/direct/token.properties
# change use .docker by default and fallback to in-image property file
if [ -f /root/direct/token.properties.docker ]; then
cp -f /root/direct/token.properties.docker /root/direct/token.properties
else
cp -f /root/config/token.properties /root/direct/token.properties
fi
cp -f /root/config/topcoder_global.properties /root/direct/topcoder_global.properties

# build and deploy
Expand Down