-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
36 lines (25 loc) · 1.13 KB
/
deploy.sh
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
#!/bin/sh
mkdir -p $TRAVIS_BUILD_DIR/tmp/build
docker cp watashi-client:/usr/src/app/client/build/. $TRAVIS_BUILD_DIR/tmp/build
# build static files
echo 'echo rsync tmp/build'
rsync -r --delete-after --quiet $TRAVIS_BUILD_DIR/tmp/build/. [email protected]:/docker/letsencrypt-docker-nginx/src/production/production-site
# docker-compose.yml file
echo 'echo rsync watashi-nginx/docker-compose.yml'
rsync -r --delete-after --quiet $TRAVIS_BUILD_DIR/watashi-nginx/docker-compose.yml [email protected]:/docker/letsencrypt-docker-nginx/src/production
# nginx.conf file
echo 'echo rsync watashi-nginx/nginx.conf'
rsync -r --delete-after --quiet $TRAVIS_BUILD_DIR/watashi-nginx/nginx.conf [email protected]:/docker/letsencrypt-docker-nginx/src/production
ssh [email protected] <<EOF
echo "docker pull dottjt/watashi-api"
docker pull dottjt/watashi-api
echo "echo cd /docker/letsencrypt-docker-nginx/src/production/"
cd /docker/letsencrypt-docker-nginx/src/production/
echo "echo docker-compose down"
docker-compose down
echo "echo docker-compose up -d"
docker-compose up -d
echo "echo exit"
exit
EOF
echo 'all done!'