-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
47 lines (47 loc) · 1.99 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
43
44
45
46
47
language: elixir
elixir:
- 1.8.2
otp_release:
- '22.0'
sudo: enabled
addons:
ssh_known_hosts: 198.199.67.180
branches:
only:
- production
services:
- docker
env:
global:
- secure: V1UHrtiBD6tU2/LOKFpxblOtR3HapCBHlyxWxk6mEZE6Q0O2qmkggKVgVY8qBMjKmTzrYzjvxw3h9mH5LgDbSqQ9Eu9IPhL7QPfqBVvkVXs59OqdmnXNhzq9qR86CRFITfNyr3HEUjLWVl7QF0hKeZtmm9RhICVpK6kUzpmH/zTN9i11t7d/Uia79M+vzrOQlsMwya54k4famHigZrJp44+6Ao3Ov/GI4cHYjWuHHZLKNa0MhTkD+EmKek+4hZzFlQP2iPqVpvjxrjDomOGAO6wNSv1+c1afRmV7vM7Zsih7Q5vDOEK17PEwfGJ2fosvGbIQz8skeEHvsRZZHhLLostOW7mkpcz+TtUJTsPm2Yy6KK3l92L4FWasWFHLcQfeo71Sm/oAkKuzfIAFCm/5YgYItrW6Oi8MZSuq5i/3KXhZ/ni5Zc+QdwDAcxW3SnhaAkuOmmOu8wGmxXhF0NQvGTCll1VzwzbYEXGpWspTJhMTNY1nNT6dAK6XMDTP/xtVIcUzTZr3Y9ZOOmal2uRcyji4DWQPSOyA1i+PRU4odZEv93wbSsRjF5DrJ1dZzBoUYYJwMvUqT6enovv35ZFBVMe1PXwd0AnJ2J+qlerVVuXKVCJrWMHihZvn4fn+qylGvEYrY59maVLeIDlTMLOr+80lMw3/SVjHCWpIJph5SMo=
- DOCKER_USERNAME=dottjt
- SERVER_IP_ADDRESS=198.199.67.180
before_script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker pull dottjt/nfd-app || true
script:
- ls -a
- echo "$AWS_ACCESS_KEY"
- docker-compose build --build-arg AWS_ACCESS_KEY="$AWS_ACCESS_KEY" --build-arg AWS_SECRET_KEY="$AWS_SECRET_KEY"
--build-arg JSON_API="$JSON_API" --build-arg HOST="$HOST" --build-arg POSTGRES_USER="$POSTGRES_USER"
--build-arg POSTGRES_PASSWORD="$POSTGRES_PASSWORD" --build-arg POSTGRES_DB="$POSTGRES_DB"
--build-arg POSTGRES_HOST="$POSTGRES_HOST" --build-arg SECRET_KEY_BASE="$SECRET_KEY_BASE"
--no-cache --pull nfd-app
after_script:
- docker images
before_deploy:
- openssl aes-256-cbc -K $encrypted_dfdcfd5172af_key -iv $encrypted_dfdcfd5172af_iv
-in deploy_key.enc -out ./deploy_key -d
- eval "$(ssh-agent -s)"
- chmod 600 ./deploy_key
- echo -e "Host $SERVER_IP_ADDRESS\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- ssh-add ./deploy_key
deploy:
- provider: script
script: docker push dottjt/nfd-app
on:
branch: production
- provider: script
script: bash nginx/deploy.sh
on:
branch: production