-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
42 lines (37 loc) · 1.22 KB
/
.travis.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
sudo: required
services:
- docker
# development/test build block
before_install:
# for now only client service test implemented, so build the client
- docker build -t lavalife/react-test -f ./client/dev.Dockerfile ./client
# script block is used mostly for tests
script:
# test the above built image by changin default CMD
- docker run lavalife/react-test npm run test
# production build/push block
after_success:
- docker build -t lavalife/multi-client ./client
- docker build -t lavalife/multi-nginx ./nginx
- docker build -t lavalife/multi-server ./server
- docker build -t lavalife/multi-worker ./worker
# Log in to the docker CLI
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_ID" --password-stdin
# Take those images and push them to docker hub
- docker push lavalife/multi-client
- docker push lavalife/multi-nginx
- docker push lavalife/multi-server
- docker push lavalife/multi-worker
# actual deploy to AWS
deploy:
provider: elasticbeanstalk
region: us-east-2
app: multi-docker
env: MultiDocker-env
bucket-name: elasticbeanstalk-us-east-2-638918793553
bucket-path: multi-docker
on:
branch: master
access_key_id: $AWS_ACCESS_KEY
secret_access_key:
secure: $AWS_SECRET_KEY