Skip to content

Commit dc7072e

Browse files
author
vikasrohit
authored
Merge pull request #1047 from topcoder-platform/develop
Prod release: 0.4.0
2 parents c9f94ba + b13ec4e commit dc7072e

File tree

41 files changed

+1578
-561
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1578
-561
lines changed

.circleci/config.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,20 @@ builddeploy_steps: &builddeploy_steps
2828
- setup_remote_docker
2929
- run: *install_dependency
3030
- run: *install_deploysuite
31-
- run: ./build.sh ${APPNAME}
31+
- run:
32+
name: "configuring environment"
33+
command: |
34+
./awsconfiguration.sh $DEPLOY_ENV
35+
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar
36+
- run:
37+
name: "building image"
38+
command: |
39+
source buildenvvar
40+
./build.sh ${APPNAME}
3241
- deploy:
3342
name: Running MasterScript.
3443
command: |
35-
./awsconfiguration.sh $DEPLOY_ENV
44+
#./awsconfiguration.sh $DEPLOY_ENV
3645
source awsenvconf
3746
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar
3847
source buildenvvar

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ npm install
3939

4040
1. copy the environment file in docs/dev.env to /.env
4141

42-
1. add `127.0.0.1 local.topcoder-dev.com` to your /etc/hosts file
43-
4442
1. If you are using local instances of the API's, change the DEV_API_HOSTNAME in configs/constants/development.js to match your local api endpoint.
4543
- For example change it to 'http://localhost:3000/',
4644

@@ -50,7 +48,7 @@ npm install
5048
npm run dev
5149
```
5250

53-
You can access the app from [http://local.topcoder-dev.com:3001/](http://local.topcoder-dev.com:3001/)
51+
You can access the app from [http://localhost:3000/](http://localhost:3000/)
5452

5553
The page will reload if you make edits.
5654

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ APP_NAME=$1
44
UPDATE_CACHE=""
55
echo "NODE ENV: $NODE_ENV"
66
echo "BABEL ENV: $BABEL_ENV"
7-
docker-compose -f docker/docker-compose.yml build --build-arg NODE_ENV=$NODE_ENV --build-arg BABEL_ENV=$BABEL_ENV $APP_NAME
7+
docker-compose -f docker/docker-compose.yml build --build-arg NODE_ENV=$NODE_ENV --build-arg BABEL_ENV=$BABEL_ENV --build-arg FILE_PICKER_API_KEY=$FILE_PICKER_API_KEY --build-arg FORCE_DEV=$FORCE_DEV $APP_NAME
88
docker create --name app $APP_NAME:latest
99

1010
if [ -d node_modules ]

config/constants/development.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ module.exports = {
77
COMMUNITY_APP_URL: `https://www.${DOMAIN}`,
88
MEMBER_API_URL: `${DEV_API_HOSTNAME}/v4/members`,
99
MEMBER_API_V3_URL: `${DEV_API_HOSTNAME}/v3/members`,
10-
DEV_APP_URL: `http://local.${DOMAIN}`,
1110
CHALLENGE_API_URL: `${DEV_API_HOSTNAME}/v5/challenges`,
1211
CHALLENGE_TIMELINE_TEMPLATES_URL: `${DEV_API_HOSTNAME}/v5/timeline-templates`,
1312
CHALLENGE_TYPES_URL: `${DEV_API_HOSTNAME}/v5/challenge-types`,
@@ -32,5 +31,9 @@ module.exports = {
3231
DS_TRACK_ID: 'c0f5d461-8219-4c14-878a-c3a3f356466d',
3332
QA_TRACK_ID: '36e6a8d0-7e1e-4608-a673-64279d99c115',
3433
SEGMENT_API_KEY: 'QBtLgV8vCiuRX1lDikbMjcoe9aCHkF6n',
35-
CREATE_FORUM_TYPE_IDS: ['927abff4-7af9-4145-8ba1-577c16e64e2e', 'dc876fa4-ef2d-4eee-b701-b555fcc6544c']
34+
CREATE_FORUM_TYPE_IDS: ['927abff4-7af9-4145-8ba1-577c16e64e2e', 'dc876fa4-ef2d-4eee-b701-b555fcc6544c'],
35+
FILE_PICKER_API_KEY: process.env.FILE_PICKER_API_KEY,
36+
FILE_PICKER_CONTAINER_NAME: 'tc-challenge-v5-dev',
37+
FILE_PICKER_REGION: 'us-east-1',
38+
FILE_PICKER_CNAME: 'fs.topcoder.com'
3639
}

config/constants/production.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ module.exports = {
77
COMMUNITY_APP_URL: `https://www.${DOMAIN}`,
88
MEMBER_API_URL: `${PROD_API_HOSTNAME}/v4/members`,
99
MEMBER_API_V3_URL: `${PROD_API_HOSTNAME}/v3/members`,
10-
DEV_APP_URL: `https://submission-review.${DOMAIN}`,
1110
CHALLENGE_API_URL: `${PROD_API_HOSTNAME}/v5/challenges`,
1211
CHALLENGE_TIMELINE_TEMPLATES_URL: `${PROD_API_HOSTNAME}/v5/timeline-templates`,
1312
CHALLENGE_TYPES_URL: `${PROD_API_HOSTNAME}/v5/challenge-types`,
@@ -32,5 +31,9 @@ module.exports = {
3231
DS_TRACK_ID: 'c0f5d461-8219-4c14-878a-c3a3f356466d',
3332
QA_TRACK_ID: '36e6a8d0-7e1e-4608-a673-64279d99c115',
3433
SEGMENT_API_KEY: 'QSQAW5BWmZfLoKFNRgNKaqHvLDLJoGqF',
35-
CREATE_FORUM_TYPE_IDS: ['927abff4-7af9-4145-8ba1-577c16e64e2e', 'dc876fa4-ef2d-4eee-b701-b555fcc6544c']
34+
CREATE_FORUM_TYPE_IDS: ['927abff4-7af9-4145-8ba1-577c16e64e2e', 'dc876fa4-ef2d-4eee-b701-b555fcc6544c'],
35+
FILE_PICKER_API_KEY: process.env.FILE_PICKER_API_KEY,
36+
FILE_PICKER_CONTAINER_NAME: 'tc-challenge-v5-prod',
37+
FILE_PICKER_REGION: 'us-east-1',
38+
FILE_PICKER_CNAME: 'fs.topcoder.com'
3639
}

docker/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ FROM node:latest
33
ARG NODE_ENV
44
ARG BABEL_ENV
55

6+
ARG FILE_PICKER_API_KEY
7+
ARG FORCE_DEV
8+
69
ENV NODE_ENV=$NODE_ENV
710
ENV BABEL_ENV=$BABEL_ENV
11+
ENV FILE_PICKER_API_KEY=$FILE_PICKER_API_KEY
12+
ENV FORCE_DEV=$FORCE_DEV
813

914
# Copy the current directory into the Docker image
1015
COPY . /challenge-engine-ui

0 commit comments

Comments
 (0)