This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| upstream deploy_phoenix { | |
| server 127.0.0.1:8888; | |
| } | |
| map $http_upgrade $connection_upgrade { | |
| default upgrade; | |
| '' close; | |
| } | |
| server { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # database PostgreSQL do |db| | |
| # ... | |
| # end | |
| encrypt_with GPG do |encryption| | |
| encryption.keys = {} | |
| encryption.keys['[email protected]'] = <<-KEY | |
| -----BEGIN PGP PUBLIC KEY BLOCK----- | |
| Version: GnuPG v1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ensure that cron's path is the same as your current one | |
| env :PATH, ENV['PATH'] | |
| every 1.hour do | |
| command "backup perform -t deploy_phoenix_prod_backup" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ... | |
| store_with S3 do |s3| | |
| s3.access_key_id = "AKIAJG7SETLXXZDEL5AQ" | |
| s3.secret_access_key = "u1hNpXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" | |
| # If you've chosen a different region, you should change us-east-1 to | |
| # us-west-1, eu-west-1, ap-southeast-1, ap-northeast-1, etc. | |
| s3.region = "us-east-1" | |
| s3.bucket = "deploy-phoenix" | |
| s3.path = "/prod/#{storage_id}" | |
| s3.keep = keep |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "Stmt1454490809000", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "s3:ListBucket" | |
| ], | |
| "Resource": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Model.new(:deploy_phoenix_prod_backup, 'deploy_phoenix Production Backup') do | |
| database PostgreSQL do |db| | |
| db.name = "deployphoenix_prod" | |
| db.username = "deployphoenix" | |
| db.password = "mypassword" | |
| db.host = "localhost" | |
| db.port = 5432 | |
| # db.socket = "/tmp/pg.sock" | |
| db.skip_tables = [] | |
| # db.only_tables = ["only", "these", "tables"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def project do | |
| [app: :deploy_phoenix, | |
| version: "0.1.0", | |
| # ... | |
| ] | |
| end | |
| # ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="jumbotron"> | |
| <h2><%= gettext "Welcome to %{name}", name: "Phoenix!" %></h2> | |
| <p class="lead">This is a test deployment.</p> | |
| </div> | |
| <!-- ... --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=Phoenix server for DeployPhoenix app | |
| After=network.target | |
| [Service] | |
| User=deploy | |
| Group=deploy | |
| Restart=on-failure | |
| Environment=HOME=/home/deploy/deploy_phoenix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| upstream deploy_phoenix { | |
| server 127.0.0.1:8888; | |
| } | |
| map $http_upgrade $connection_upgrade { | |
| default upgrade; | |
| '' close; | |
| } | |
| server { |