Skip to content

Commit

Permalink
Merge pull request #1047 from topcoder-platform/develop
Browse files Browse the repository at this point in the history
Prod release: 0.4.0
  • Loading branch information
vikasrohit authored Jan 19, 2021
2 parents c9f94ba + b13ec4e commit dc7072e
Show file tree
Hide file tree
Showing 41 changed files with 1,578 additions and 561 deletions.
13 changes: 11 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,20 @@ builddeploy_steps: &builddeploy_steps
- setup_remote_docker
- run: *install_dependency
- run: *install_deploysuite
- run: ./build.sh ${APPNAME}
- run:
name: "configuring environment"
command: |
./awsconfiguration.sh $DEPLOY_ENV
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar
- run:
name: "building image"
command: |
source buildenvvar
./build.sh ${APPNAME}
- deploy:
name: Running MasterScript.
command: |
./awsconfiguration.sh $DEPLOY_ENV
#./awsconfiguration.sh $DEPLOY_ENV
source awsenvconf
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar
source buildenvvar
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ npm install

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

1. add `127.0.0.1 local.topcoder-dev.com` to your /etc/hosts file

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.
- For example change it to 'http://localhost:3000/',

Expand All @@ -50,7 +48,7 @@ npm install
npm run dev
```

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

The page will reload if you make edits.

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ APP_NAME=$1
UPDATE_CACHE=""
echo "NODE ENV: $NODE_ENV"
echo "BABEL ENV: $BABEL_ENV"
docker-compose -f docker/docker-compose.yml build --build-arg NODE_ENV=$NODE_ENV --build-arg BABEL_ENV=$BABEL_ENV $APP_NAME
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
docker create --name app $APP_NAME:latest

if [ -d node_modules ]
Expand Down
7 changes: 5 additions & 2 deletions config/constants/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module.exports = {
COMMUNITY_APP_URL: `https://www.${DOMAIN}`,
MEMBER_API_URL: `${DEV_API_HOSTNAME}/v4/members`,
MEMBER_API_V3_URL: `${DEV_API_HOSTNAME}/v3/members`,
DEV_APP_URL: `http://local.${DOMAIN}`,
CHALLENGE_API_URL: `${DEV_API_HOSTNAME}/v5/challenges`,
CHALLENGE_TIMELINE_TEMPLATES_URL: `${DEV_API_HOSTNAME}/v5/timeline-templates`,
CHALLENGE_TYPES_URL: `${DEV_API_HOSTNAME}/v5/challenge-types`,
Expand All @@ -32,5 +31,9 @@ module.exports = {
DS_TRACK_ID: 'c0f5d461-8219-4c14-878a-c3a3f356466d',
QA_TRACK_ID: '36e6a8d0-7e1e-4608-a673-64279d99c115',
SEGMENT_API_KEY: 'QBtLgV8vCiuRX1lDikbMjcoe9aCHkF6n',
CREATE_FORUM_TYPE_IDS: ['927abff4-7af9-4145-8ba1-577c16e64e2e', 'dc876fa4-ef2d-4eee-b701-b555fcc6544c']
CREATE_FORUM_TYPE_IDS: ['927abff4-7af9-4145-8ba1-577c16e64e2e', 'dc876fa4-ef2d-4eee-b701-b555fcc6544c'],
FILE_PICKER_API_KEY: process.env.FILE_PICKER_API_KEY,
FILE_PICKER_CONTAINER_NAME: 'tc-challenge-v5-dev',
FILE_PICKER_REGION: 'us-east-1',
FILE_PICKER_CNAME: 'fs.topcoder.com'
}
7 changes: 5 additions & 2 deletions config/constants/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module.exports = {
COMMUNITY_APP_URL: `https://www.${DOMAIN}`,
MEMBER_API_URL: `${PROD_API_HOSTNAME}/v4/members`,
MEMBER_API_V3_URL: `${PROD_API_HOSTNAME}/v3/members`,
DEV_APP_URL: `https://submission-review.${DOMAIN}`,
CHALLENGE_API_URL: `${PROD_API_HOSTNAME}/v5/challenges`,
CHALLENGE_TIMELINE_TEMPLATES_URL: `${PROD_API_HOSTNAME}/v5/timeline-templates`,
CHALLENGE_TYPES_URL: `${PROD_API_HOSTNAME}/v5/challenge-types`,
Expand All @@ -32,5 +31,9 @@ module.exports = {
DS_TRACK_ID: 'c0f5d461-8219-4c14-878a-c3a3f356466d',
QA_TRACK_ID: '36e6a8d0-7e1e-4608-a673-64279d99c115',
SEGMENT_API_KEY: 'QSQAW5BWmZfLoKFNRgNKaqHvLDLJoGqF',
CREATE_FORUM_TYPE_IDS: ['927abff4-7af9-4145-8ba1-577c16e64e2e', 'dc876fa4-ef2d-4eee-b701-b555fcc6544c']
CREATE_FORUM_TYPE_IDS: ['927abff4-7af9-4145-8ba1-577c16e64e2e', 'dc876fa4-ef2d-4eee-b701-b555fcc6544c'],
FILE_PICKER_API_KEY: process.env.FILE_PICKER_API_KEY,
FILE_PICKER_CONTAINER_NAME: 'tc-challenge-v5-prod',
FILE_PICKER_REGION: 'us-east-1',
FILE_PICKER_CNAME: 'fs.topcoder.com'
}
5 changes: 5 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ FROM node:latest
ARG NODE_ENV
ARG BABEL_ENV

ARG FILE_PICKER_API_KEY
ARG FORCE_DEV

ENV NODE_ENV=$NODE_ENV
ENV BABEL_ENV=$BABEL_ENV
ENV FILE_PICKER_API_KEY=$FILE_PICKER_API_KEY
ENV FORCE_DEV=$FORCE_DEV

# Copy the current directory into the Docker image
COPY . /challenge-engine-ui
Expand Down
Loading

0 comments on commit dc7072e

Please sign in to comment.