Skip to content

Commit 2f5ba22

Browse files
committed
Use yml file for Ansible config
1 parent 1739260 commit 2f5ba22

File tree

4 files changed

+22
-29
lines changed

4 files changed

+22
-29
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ client-react.test/build
2222

2323
# ops
2424
ops/hosts
25+
ops/config.yml
2526
ops/*.retry
2627

2728
# other

ops/config.yml.example

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
all:
2+
vars:
3+
# The following vars apply globally; additional config is in group_vars/all.
4+
app_name: aspnetCoreReactTemplate
5+
production:
6+
hosts:
7+
0.0.0.0 # The IP address or hostname of the production web server
8+
vars:
9+
deploy_user: jdoe # The name of the remote user account for provisioning and deployment
10+
gh_pubkey_user: johndoe1981 # The GitHub username used to pull the public key for deploy_user authorized_user access
11+
use_ssl: true # If true, SSL cert will be obtained from Let's Encrypt and Nginx provisioned for SSL
12+
letsencrypt_use_live_ca: true # If true, will use the Live Let's Encrypt ACME servers; otherwise will use staging server
13+
database_password: super!secret # PostgreSQL database will be configured with this password
14+
postgresql_backup_to_s3: true # If true, PostgresSQL backups will be moved to S3 storage
15+
s3_key: ABCDEFGHIJKLMNOP # S3 Access Key used for uploading PostgreSQL backups
16+
s3_secret: ABCDEFGHIJKLMNOP # S3 Access Secret used for uploading PostgreSQL backups
17+
jwt_key: 6872f99e-cb09 # The key to use for generating JWTs
18+
smtp_config: user:[email protected]:587 # The SMTP configuration for sending outgoing mail
19+
email_from_address: [email protected] # The email address for outgoing email

ops/hosts.example

Lines changed: 0 additions & 27 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"prestart": "docker-compose up -d",
1515
"start": "cd ./api && cross-env NODE_PATH=../node_modules/ ASPNETCORE_ENVIRONMENT=Development dotnet watch run",
1616
"start:release": "npm run prerelease && cd ./api/bin/Release/netcoreapp1.0/publish/ && dotnet api.dll",
17-
"provision:prod": "ansible-playbook -l production -i ./ops/hosts ./ops/provision.yml",
17+
"provision:prod": "ansible-playbook -l production -i ./ops/config.yml ./ops/provision.yml",
1818
"prerelease": "cross-env ASPNETCORE_ENVIRONMENT=Production webpack --config ./client-react/webpack.config.js && cd ./api && dotnet publish --configuration Release",
19-
"deploy:prod": "npm run prerelease && ansible-playbook -l production -i ./ops/hosts ./ops/deploy.yml",
19+
"deploy:prod": "npm run prerelease && ansible-playbook -l production -i ./ops/config.yml ./ops/deploy.yml",
2020
"ssh:prod": "ssh `grep 'deploy_user=' ./ops/hosts | tail -n1 | awk -F'=' '{ print $2}'`@`awk 'f{print;f=0} /[production]/{f=1}' ./ops/hosts | head -n 1`"
2121
},
2222
"author": "",

0 commit comments

Comments
 (0)