Skip to content

Commit e300dff

Browse files
committed
Improving scripts
1 parent ea96a2d commit e300dff

File tree

5 files changed

+27
-3
lines changed

5 files changed

+27
-3
lines changed

devops/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Installing tools
2+
----------------
3+
1. Ansible
4+
2. Capistrano
5+
6+
Installing server tools
7+
-----------------------
8+
- Modify the server IP where tagbase-server will be deployed.
9+
- Open the `devops/inventory` file and modify the IPs specified under `prod_server` and `dev_servers` tags.
10+
- Run the following ansible command
11+
```
12+
ansible-playbook -i ./inventory tagserver_playbook.yaml
13+
```
14+
15+
Deploying tagbase-server
16+
------------------------
17+
- Run the following capistrano to deploy into the staging server
18+
```
19+
cap staging deploy
20+
```
21+

devops/capistrano/config/deploy.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@
5555
task :rebuild_deps do
5656
on roles(:app) do
5757
# Your restart mechanism here, for example:
58-
execute '(cd /home/ubuntu/tagbase-server/current; sudo docker-compose build)'
58+
execute '(cd /home/ubuntu/tagbase-server/current; sudo docker-compose build --build-arg POSTGRES_PASSWORD="${POSTGRES_PASSWORD}" --build-arg POSTGRES_PORT="${POSTGRES_PORT}" --build-arg NGINX_USER="${NGINX_USER}" --build-arg NGINX_PASS="${NGINX_PASS}")'
59+
5960
#execute (cd /home/ubuntu/tagbase-server; docker-compose down; docker-compose up -d)
6061
end
6162
end

devops/capistrano/config/deploy/staging.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
set :branch, "149_configuration_tool"
2-
set :server_ip, "3.145.103.174"
2+
set :server_ip, "18.116.62.197"
33

44
# server-based syntax
55
# ======================

devops/inventory

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ tagbase_server_devserver docker_service_name=tagbase_server_devserver
55
#one.example.com
66

77
[dev_servers]
8-
3.145.103.174
8+
18.116.62.197
99

1010
#one.example.com
1111

devops/tagserver_playbook.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,6 @@
7272
POSTGRES_PORT=5432
7373
SLACK_BOT_CHANNEL=tagbase-server
7474
SLACK_BOT_TOKEN=XYZXYZ
75+
NGINX_USER=nginx_user
76+
NGINX_PASS=nginx_pass
7577
dest: /home/ubuntu/tagbase-server/.env

0 commit comments

Comments
 (0)