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
``` | |
django_1 | Traceback (most recent call last): | |
django_1 | File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 135, in handle | |
django_1 | self.handle_request(listener, req, client, addr) | |
django_1 | File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 176, in handle_request | |
django_1 | respiter = self.wsgi(environ, resp.start_response) | |
django_1 | File "/usr/local/lib/python3.6/site-packages/newrelic/api/wsgi_application.py", line 667, in _nr_wsgi_application_wrapper_ | |
django_1 | result = wrapped(environ, _start_response) | |
django_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/wsgi.py", line 141, in __call__ | |
django_1 | response = self.get_response(request) |
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
import yaml | |
import subprocess | |
def main(): | |
subprocess.run(['docker-compose', '-f', 'production.yml', 'build']) | |
with open("production.yml", 'r') as stream: | |
try: | |
prod_yaml = yaml.safe_load(stream) | |
for service in prod_yaml.get('services').values(): | |
image = service['image'] |
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
logLevel = "INFO" | |
defaultEntryPoints = ["http"] | |
# Entrypoints, http and https | |
[entryPoints] | |
[entryPoints.http] | |
address = ":80" | |
[file] | |
[backends] |
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
lionel@machine:~/code/cookiecutter_aws (convert-compose)$ ecs-cli compose --file production.yml service up | |
WARN[0000] Skipping unsupported YAML option for service... option name=build service name=django | |
WARN[0000] Skipping unsupported YAML option for service... option name=depends_on service name=django | |
WARN[0000] Skipping unsupported YAML option for service... option name=build service name=postgres | |
WARN[0000] Skipping unsupported YAML option for service... option name=depends_on service name=traefik | |
ERRO[0001] Error registering task definition error="ClientException: containerPath values aren't unique across mountPoints.\n\tstatus code: 400, request id: 425f2d91-c69a-443d-bd17-3f8792249284" family=cookiecutter_aws | |
ERRO[0001] Create task definition failed error="ClientException: containerPath values aren't unique across mountPoints.\n\tstatus code: 400, request id: 425f2d91-c69a-443d-bd17-3f8792249284" | |
FATA[0001] ClientException: containerPath values aren't unique across moun |
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
lionel@machine:~/code/cookiecutter_aws (convert-compose)$ ecs-cli up --instance-role cookiecutter -f | |
WARN[0000] You will not be able to SSH into your EC2 instances without a key pair. | |
INFO[0001] Defaulting instance type to t2.micro | |
INFO[0002] Using recommended Amazon Linux 2 AMI with ECS Agent 1.29.1 and Docker version 18.06.1-ce | |
INFO[0002] Created cluster cluster=cookiecutter region=us-east-1 | |
INFO[0002] Waiting for your CloudFormation stack resources to be deleted... | |
INFO[0003] Cloudformation stack status stackStatus=DELETE_IN_PROGRESS | |
ERRO[0033] Error deleting cloudformation stack eventStatus=DELETE_FAILED reason="The following resource(s) failed to delete: [EcsInstanceProfile]. " resource="arn:aws:cloudformation:us-east-1:727419036083:stack/amazon-ecs-cli-setup-cookiecutter/74d4d800-bcd6-11e9-9d59-0a1fbafbd996" | |
FATA[0033] Error executing 'up': Cloudformation failure waiting for 'DELETE_COMPLETE'. Reason: 'The following resource(s) failed |
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
lionel@machine:~/code/cookiecutter_aws (master)$ python convert-docker-compose-to-aws.py | |
DOCKERHUB_USER=lionelv | |
Input file: production.yml | |
Output file: production.yml | |
redis uses an image, skipping | |
Building postgres | |
Step 1/4 : FROM postgres:11.3 | |
---> 4e045cb8eecd | |
Step 2/4 : COPY ./compose/production/postgres/maintenance /usr/local/bin/maintenance | |
---> Using cache |
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
lionel@machine:~/code/cookiecutter_aws (master)$ python convert-docker-compose-to-aws.py | |
DOCKERHUB_USER=lionelv | |
Input file: production.yml | |
Output file: production.yml | |
redis uses an image, skipping | |
Building postgres | |
Step 1/4 : FROM postgres:11.3 | |
---> 4e045cb8eecd | |
Step 2/4 : COPY ./compose/production/postgres/maintenance /usr/local/bin/maintenance | |
---> Using cache |
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
#!/usr/bin/env python | |
""" | |
Adds clubhouse story # to your commit message. | |
1. Replace CLUBHOUSE_URL and TASK_REPLACE_STR | |
2. Copy this file to $GITREPOSITORY/.git/hooks/prepare-commit-msg | |
3. Mark hook as executable. e.g. chmod -x .git/hooks/prepare-commit-msg | |
""" | |
import sys, os, re |
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 efficiency_for_team_dates(company, team_id, granularity, ref_dates): | |
team = Team.load_id(team_id) | |
projects = team.projects_for(ProjectType.GITHUB) | |
for project in projects.itervalues(): | |
for ref_date in ref_dates: | |
start, end = StatsGranularity.get_extents( | |
granularity, ref_date, team.timezone) | |
calculate_efficiency.delay( | |
company, project.id, project.foreign_id, start, end) |
NewerOlder