This file contains 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
annotations: | |
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: “https” | |
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: “arn:aws:iam::ABCDE:server-certificate/www_yourwebsite_com” | |
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: “443” | |
service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled: “true” | |
service.beta.kubernetes.io/aws-load-balancer-connection-draining-timeout: “60” |
This file contains 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nginx | |
annotations: | |
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: “https” | |
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: “arn:aws:iam::ABCDE:server-certificate/www_yourwebsite_com” | |
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: “443” | |
service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled: “true” | |
service.beta.kubernetes.io/aws-load-balancer-connection-draining-timeout: “60” |
This file contains 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
apiVersion: autoscaling/v1 | |
kind: HorizontalPodAutoscaler | |
metadata: | |
name: php-fpm | |
namespace: {{STACK_NAME}} | |
spec: | |
scaleTargetRef: | |
kind: Deployment | |
name: php-fpm-{{STACK_NAME}} | |
minReplicas: {{NUM_PHP}} |
This file contains 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
functions: | |
migrate: | |
environment: ${self:custom.variables} | |
handler: migrate.handler |
This file contains 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
import os | |
def hello(event, context): | |
return { | |
"statusCode": 200, | |
"body": "The answer is: " + os.environ["THE_ANSWER"] | |
} |
This file contains 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
plugins: | |
- serverless-wsgi | |
- serverless-python-requirements |
This file contains 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
service: serverless-django | |
custom: ${file(./variables.yml)} | |
provider: | |
name: aws | |
runtime: python3.7 | |
functions: | |
hello: | |
environment: ${self:custom} | |
handler: handler.hello |
This file contains 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
#!/usr/bin/env python | |
import os | |
import sys | |
def handler(event, context): | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mydjangoproject.settings") | |
try: | |
from django.core.management import execute_from_command_line | |
except ImportError: | |
# The above import may fail for some other reason. Ensure that the |
This file contains 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
#!/usr/bin/env python | |
import os | |
import sys | |
def hello(event, context): | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mydjangoproject.settings") | |
try: | |
from django.core.management import execute_from_command_line | |
except ImportError: | |
# The above import may fail for some other reason. Ensure that the |
This file contains 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
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.postgresql_psycopg2', | |
'NAME': 'mydjangoproject', | |
'USER': os.environ.get('DB_USER', 'postgres'), | |
'PASSWORD': os.environ.get('DB_PASSWORD'), | |
'HOST': os.environ.get('DB_HOST', 'localhost'), | |
'PORT': os.environ.get('DB_PORT', 5432), | |
} | |
} |
OlderNewer