-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DBTP-457 Add DBT PaaS CodeBuild configuration (#464)
Co-authored-by: Anthony Roy <[email protected]> Co-authored-by: Lawrence Goldstien <[email protected]> Co-authored-by: Yusuf <[email protected]> Co-authored-by: Cameron Lamb <[email protected]> Co-authored-by: Anthony Roy <[email protected]>
- Loading branch information
1 parent
f95d766
commit eb62598
Showing
17 changed files
with
143 additions
and
108 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"buildpacks": [ | ||
{ | ||
"paketo-buildpacks": "python" | ||
}, | ||
{ | ||
"paketo-buildpacks": "nodejs" | ||
}, | ||
{ | ||
"fagiani" : "run" | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
application: | ||
name: intranet | ||
process: | ||
# The way DBT PaaS works currently we need one entry | ||
# here for each of the entries in the Procfile. | ||
# The only actual different in the three images created | ||
# is the process they start up with. | ||
# There is a plan ensure it only needs to build one | ||
# image in the near future. | ||
- web | ||
- beat # celery beat | ||
- worker # celery worker |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: 0.2 | ||
env: | ||
parameter-store: | ||
SLACK_WORKSPACE_ID: "/codebuild/slack_workspace_id" | ||
SLACK_CHANNEL_ID: "/codebuild/slack_channel_id" | ||
SLACK_TOKEN: "/codebuild/slack_api_token" | ||
variables: | ||
PAKETO_BUILDER_VERSION: 0.2.443-full | ||
LIFECYCLE_VERSION: 0.16.5 | ||
|
||
phases: | ||
# install: | ||
|
||
pre_build: | ||
commands: | ||
- codebuild-breakpoint | ||
|
||
build: | ||
commands: | ||
- /work/build.sh |
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
Empty file.
Empty file.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from .base import * # noqa | ||
|
||
APP_ENV = "build" |
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
src/config/settings/local.py → src/config/settings/developer.py
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from .prod import * # noqa F403 | ||
|
||
INSTALLED_APPS += [ # noqa F405 | ||
"elasticapm.contrib.django", | ||
] | ||
|
||
ELASTIC_APM = { | ||
"SERVICE_NAME": "Digital Workspace", | ||
"SECRET_TOKEN": env("ELASTIC_APM_SECRET_TOKEN"), # noqa F405 | ||
"SERVER_URL": env("ELASTIC_APM_SERVER_URL"), # noqa F405 | ||
"ENVIRONMENT": env("APP_ENV"), # noqa F405 | ||
"SERVER_TIMEOUT": env("ELASTIC_APM_SERVER_TIMEOUT", default="20s"), # noqa F405 | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,27 @@ | ||
from .env import * # noqa | ||
from .base import * # noqa | ||
|
||
DEBUG = False | ||
|
||
AWS_S3_URL_PROTOCOL = "https:" | ||
AWS_S3_CUSTOM_DOMAIN = env("AWS_S3_CUSTOM_DOMAIN") # noqa F405 | ||
AWS_QUERYSTRING_AUTH = False | ||
|
||
SESSION_COOKIE_AGE = 60 * 60 | ||
|
||
SECURE_BROWSER_XSS_FILTER = True | ||
X_FRAME_OPTIONS = "DENY" | ||
SECURE_CONTENT_TYPE_NOSNIFF = True | ||
SECURE_HSTS_SECONDS = 15768000 | ||
SECURE_HSTS_INCLUDE_SUBDOMAINS = True | ||
SECURE_HSTS_PRELOAD = True | ||
SECURE_SSL_REDIRECT = True | ||
CSRF_COOKIE_SECURE = True | ||
SESSION_COOKIE_SECURE = True | ||
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") | ||
|
||
LOGGING["root"]["handlers"] = [ # noqa F405 | ||
"ecs", | ||
"simple", | ||
] | ||
LOGGING["loggers"]["django"]["propagate"] = False # noqa F405 | ||
LOGGING["loggers"]["django.db.backends"]["propagate"] = False # noqa F405 |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Exit early if something goes wrong | ||
set -e | ||
|
||
echo "Running post build script" | ||
|
||
echo "Running pip install" | ||
pip install -r requirements.txt | ||
|
||
echo "Running npm ci" | ||
npm ci | ||
|
||
echo "Renaming .env.ci to .env" | ||
mv ".env.ci" ".env" | ||
|
||
cd src | ||
|
||
echo "Running collectstatic" | ||
python manage.py collectstatic --settings=config.settings.build --noinput | ||
|
||
echo "Renaming .env to .env.ci" | ||
cd ../ | ||
mv ".env" ".env.ci" |