forked from codefreshdemo/demochat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
codefresh.compose.v3.yml
53 lines (51 loc) · 1.37 KB
/
codefresh.compose.v3.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
version: '1.0'
steps:
build_step:
type: build
dockerfile: Dockerfile
image-name: demochat
tag: ${{CF_BRANCH}}
# unit_tests:
# image: ${{build_step}}
# fail-fast: false
# commands:
# - sh -c './services/aws/setvars-stage.sh && ./services/aws/deploy.sh'
# commands:
# - npm install
# - gulp test
#
integration_step:
type: composition
working_directory: /root/demochat
composition:
version: '3'
services:
app:
image: ${{build_step}}
links:
- mongo
ports:
- 5000
healthcheck:
test: ["CMD", "wget", "-q", "http://localhost:5000/"]
interval: 1m30s
timeout: 10s
retries: 3
mongo:
image: mongo
composition-candidates:
main:
image: alpine:3.5
command: sh -c "for i in 1 2 3 4 5; do wget -s -q http://app:5000/ && break || sleep 20; done && wget -s -q http://app:5000/" | echo 'works'
#
# deploy_to_ecs:
# image: codefresh/cf-deploy-ecs
# commands:
# - cfecs-update --image-name demochat --image-tag ${{CF_BRANCH}} eu-west-1 demochat-cluster demochat-webapp
# environment:
# - AWS_ACCESS_KEY_ID=${{AWS_ACCESS_KEY_ID}}
# - AWS_SECRET_ACCESS_KEY=${{AWS_SECRET_ACCESS_KEY}}
# when:
# branch:
# only:
# - master