File tree Expand file tree Collapse file tree 4 files changed +55
-1
lines changed Expand file tree Collapse file tree 4 files changed +55
-1
lines changed Original file line number Diff line number Diff line change
1
+ version : 2
2
+
3
+ jobs :
4
+ # Build & Deploy against development backend
5
+ " build-dev " :
6
+ docker :
7
+ - image : docker:18.06.0-ce-git
8
+ steps :
9
+ # Initialization.
10
+ - checkout
11
+ - setup_remote_docker
12
+ - run :
13
+ name : Installation of build dependencies.
14
+ command : |
15
+ apk add --no-cache bash
16
+ apk add --no-cache jq py-pip sudo curl
17
+ pip install --upgrade pip
18
+ sudo pip install awscli --upgrade
19
+ sudo curl -o /usr/local/bin/ecs-cli https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-amd64-latest
20
+ sudo pip install docker-compose
21
+ sudo chmod +x /usr/local/bin/ecs-cli
22
+ - run :
23
+ name : Installation of build dependencies.
24
+ command : ./build.sh DEV
25
+ - deploy :
26
+ command : |
27
+ git clone --branch master https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
28
+ cp ./../buildscript/master_deply_v4.2.sh .
29
+ ./master_deply_v4.2.sh -d ECS -e DEV -t $CIRCLE_BUILD_NUM -s submission-processor-es
30
+
31
+
32
+ workflows :
33
+ version : 2
34
+ build :
35
+ jobs :
36
+ # Development builds are executed on "develop" branch only.
37
+ - " build-dev " :
38
+ filters :
39
+ branches :
40
+ only : dev-circleci
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -eo pipefail
3
+ ENV=$1
4
+ AWS_ACCOUNT_ID=$( eval " echo \$ ${ENV} _AWS_ACCOUNT_ID" )
5
+ AWS_REGION=$( eval " echo \$ ${ENV} _AWS_REGION" )
6
+ AWS_REPOSITORY=$( eval " echo \$ ${ENV} _AWS_REPOSITORY" )
7
+
8
+ # Builds Docker image of the app.
9
+ TAG=$AWS_ACCOUNT_ID .dkr.ecr.$AWS_REGION .amazonaws.com/$AWS_REPOSITORY :$CIRCLE_BUILD_NUM
10
+ sed -i=' ' " s|submission-processor-es:latest|$TAG |" docker/docker-compose.yml
11
+ echo " " > docker/api.env
12
+ docker-compose -f docker/docker-compose.yml build submission-processor-es
13
+ docker images
Original file line number Diff line number Diff line change @@ -9,3 +9,4 @@ WORKDIR /submission-processor-es
9
9
10
10
# Install the dependencies from package.json
11
11
RUN npm install
12
+ CMD npm start
Original file line number Diff line number Diff line change 1
1
version : ' 3'
2
2
services :
3
3
submission-processor-es :
4
+ image : submission-processor-es:latest
4
5
build :
5
6
context : ../
6
7
dockerfile : docker/Dockerfile
7
8
env_file :
8
9
- api.env
9
- command : npm start
10
10
network_mode : " host"
You can’t perform that action at this time.
0 commit comments