File tree 4 files changed +95
-0
lines changed
4 files changed +95
-0
lines changed Original file line number Diff line number Diff line change
1
+ version : 2
2
+ defaults : &defaults
3
+ docker :
4
+ - image : circleci/python:2.7-stretch-browsers
5
+ install_dependency : &install_dependency
6
+ name : Installation of build and deployment dependencies.
7
+ command : |
8
+ sudo apt install jq
9
+ sudo pip install awscli --upgrade
10
+ sudo pip install docker-compose
11
+ install_deploysuite : &install_deploysuite
12
+ name : Installation of install_deploysuite.
13
+ command : |
14
+ git clone --branch v1.3 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
15
+ cp ./../buildscript/master_deploy.sh .
16
+ cp ./../buildscript/buildenv.sh .
17
+ cp ./../buildscript/awsconfiguration.sh .
18
+
19
+ build_steps : &build_steps
20
+ - checkout
21
+ - setup_remote_docker
22
+ - run : *install_dependency
23
+ - run : *install_deploysuite
24
+ - run : ./build.sh
25
+ - deploy :
26
+ name : Running MasterScript.
27
+ command : |
28
+ ./awsconfiguration.sh ${DEPLOY_ENV}
29
+ source awsenvconf
30
+ #./buildenv.sh -e ${DEPLOY_ENV} -b ${LOGICAL_ENV}-${APP_NAME}-deployvar
31
+ #source buildenvvar
32
+ #./master_deploy.sh -d ECS -e ${DEPLOY_ENV} -t latest -s dev-global-appvar,${LOGICAL_ENV}-${APP_NAME}-appvar -i terms-service
33
+
34
+ jobs :
35
+ # Build & Deploy against development backend
36
+ " build-dev " :
37
+ << : *defaults
38
+ environment :
39
+ DEPLOY_ENV : " DEV"
40
+ LOGICAL_ENV : " DEV"
41
+ APP_NAME : " terms-service"
42
+ steps : *build_steps
43
+ # Build & Deploy against production backend
44
+ " build-prod " :
45
+ << : *defaults
46
+ environment :
47
+ DEPLOY_ENV : " PROD"
48
+ LOGICAL_ENV : " PROD"
49
+ APP_NAME : " terms-service"
50
+ steps : *build_steps
51
+ workflows :
52
+ version : 2
53
+ build :
54
+ jobs :
55
+ # Development builds are executed on "develop" branch only.
56
+ - " build-dev " :
57
+ context : org-global
58
+ filters :
59
+ branches :
60
+ only :
61
+ - dev
62
+ - " build-prod " :
63
+ context : org-global
64
+ filters :
65
+ branches :
66
+ only :
67
+ - master
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -eo pipefail
3
+ echo " " > docker/api.env
4
+ docker-compose -f docker/docker-compose.yml build terms-service
5
+ # docker images
Original file line number Diff line number Diff line change
1
+
2
+ # Use the base image with Node.js 12.0.0
3
+ FROM node:12.0.0
4
+
5
+ # Copy the current directory into the Docker image
6
+ RUN apt-get install -y curl
7
+ COPY . /terms-service
8
+ # Set working directory for future use
9
+ WORKDIR /terms-service
10
+
11
+ # Install the dependencies from package.json
12
+ RUN npm install
13
+ CMD npm start
Original file line number Diff line number Diff line change
1
+ version : ' 3'
2
+ services :
3
+ terms-service :
4
+ image : terms-service:latest
5
+ build :
6
+ context : ../
7
+ dockerfile : docker/Dockerfile
8
+ env_file :
9
+ - api.env
10
+ network_mode : " host"
You can’t perform that action at this time.
0 commit comments