One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
backend www-redirect | |
http-request redirect prefix https://%[hdr(host),regsub(^www\.,,i)] code 302 if { hdr_beg(host) -i www. } | |
backend https-redirect | |
http-request redirect scheme https code 302 if !{ ssl_fc } |
backend www-redirect | |
http-request redirect prefix https://%[hdr(host),regsub(^www\.,,i)] code 302 if { hdr_beg(host) -i www. } | |
backend https-redirect | |
http-request redirect scheme https code 302 if !{ ssl_fc } |
.PHONY: deploy | |
deploy: ## deploy app | |
@if [[ $(ENVIRONMENT) == "development" ]]; then \ | |
if [[ ! -f .built ]]; then \ | |
$(MAKE) build; \ | |
fi; \ | |
if [[ ! -f .import ]]; then \ | |
$(MAKE) import; \ | |
fi; \ | |
if [[ ! -f .migrate ]]; then \ |
# Create all variables used in this Terraform run | |
variable "aws_access_key" {} | |
variable "aws_access_secret_key" {} | |
variable "aws_bucket_name" {} | |
variable "aws_region_main" { | |
default = "eu-west-1" | |
} | |
variable "aws_region_replica" { | |
default = "eu-central-1" | |
} |
##Install AWS CLI Tools##
cd ~/.aws
edit or create new file named config
paste the following contents inside.
Save the file as "config"
#!/usr/bin/groovy | |
/* | |
* Copyright (c) 2016, Andrey Makeev <[email protected]> | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* 1. Redistributions of source code must retain the above copyright |
node { | |
repositoryAccess = 'https://' | |
repositoryAccessSeparator = '/' | |
echo "repository host: ${repositoryHost}" // github.com | |
echo "repository path: ${repositoryPath}" // <user>/<repository>.git | |
echo "repository jenkins credentials id: ${credentialsId}" // jenkins credentials for the jenkins git account who have commit access | |
echo "repository branch: ${branch}" // master or another branch | |
echo "repository commiter username: ${repositoryCommiterUsername}" // Jenkins account email | |
echo "repository commiter name: ${repositoryCommiterEmail}" // Jenkins |
resource "aws_s3_bucket" "state" { | |
bucket = "${var.bucket_name}" | |
versioning { | |
enabled = true | |
} | |
lifecycle { | |
prevent_destroy = true | |
} |
EXECUTABLES = git terraform | |
K := $(foreach exec,$(EXECUTABLES),\ | |
$(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH, consider apt-get install $(exec)"))) |