Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: otp deploy #15

Merged
merged 3 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .deploy/rds.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"databaseName": "REPLACE_IN_PIPELINE",
"schemaName": "REPLACE_IN_PIPELINE",
"engine": "REPLACE_IN_PIPELINE",
"nodeType": "S_XSMALL"
}
32 changes: 32 additions & 0 deletions .deploy/service.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"type": "rolling",
"targetPlatform": "REPLACE_IN_PIPELINE",
"applicationData": {
"artifactUrl": "REPLACE_IN_PIPELINE",
"version": "REPLACE_IN_PIPELINE"
},
"runtime": {
"type": "REPLACE_IN_PIPELINE",
"pythonVersion": "REPLACE_IN_PIPELINE"
},
"profiles": [
{ "name": "loadBalancer", "healthCheckPath": "/health-check/" },
{ "name": "healthcheck", "interval": 30 },
{
"name": "environmentVariables",
"variables": {
"APP_ID": "REPLACE_IN_PIPELINE",
"APP_VERSION": "REPLACE_IN_PIPELINE",
"DJANGO_SETTINGS_MODULE": "REPLACE_IN_PIPELINE",
"DEBUG": "REPLACE_IN_PIPELINE",
"ENV": "REPLACE_IN_PIPELINE",
"SERVICE_PROTOCOL": "REPLACE_IN_PIPELINE",
"SERVICE_PORT": "REPLACE_IN_PIPELINE",
"MAIL_ENABLED": "REPLACE_IN_PIPELINE",
"STATIC_URL": "REPLACE_IN_PIPELINE",
"AWS_STORAGE_BUCKET_NAME": "REPLACE_IN_PIPELINE",
"WORKERS": "REPLACE_IN_PIPELINE"
}
}
]
}
5 changes: 5 additions & 0 deletions .deploy/static.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"artifactUrl": "REPLACE_IN_PIPELINE",
"assetsPrefix": "REPLACE_IN_PIPELINE",
"bucket": "REPLACE_IN_PIPELINE"
}
9 changes: 9 additions & 0 deletions .env/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 📝 Shared Variables 📝
# These variables are always loaded and shared by all environments.
#
# The final value of a variable depends on the priority of where it's being set:
# 1. Deployment pipeline.
# 2. Dedicated environment (.env.{local/development/staging/production}).
# 3. Shared environment (.env).
#
# 🚫 DO NOT PUT SECRETS HERE 🚫
9 changes: 9 additions & 0 deletions .env/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 📝 Development Variables 📝
# These variables are only loaded in the development environment.
#
# The final value of a variable depends on the priority of where it's being set:
# 1. Deployment pipeline.
# 2. Dedicated environment (.env.development).
# 3. Shared environment (.env).
#
# 🚫 DO NOT PUT SECRETS HERE 🚫
8 changes: 8 additions & 0 deletions .env/.env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 📝 Local Variables 📝
# These variables are only loaded in your local environment (on your PC).
#
# The final value of a variable depends on the priority of where it's being set:
# 1. Dedicated environment (.env.local).
# 2. Shared environment (.env).
#
# 🚫 DO NOT PUT SECRETS HERE 🚫
9 changes: 9 additions & 0 deletions .env/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 📝 Production Variables 📝
# These variables are only loaded in the production environment.
#
# The final value of a variable depends on the priority of where it's being set:
# 1. Deployment pipeline.
# 2. Dedicated environment (.env.production).
# 3. Shared environment (.env).
#
# 🚫 DO NOT PUT SECRETS HERE 🚫
9 changes: 9 additions & 0 deletions .env/.env.staging
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 📝 Staging Variables 📝
# These variables are only loaded in the staging environment.
#
# The final value of a variable depends on the priority of where it's being set:
# 1. Deployment pipeline.
# 2. Dedicated environment (.env.staging).
# 3. Shared environment (.env).
#
# 🚫 DO NOT PUT SECRETS HERE 🚫
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Pipfile export-ignore
Pipfile.lock export-ignore
manage.py export-ignore
**/.* export-ignore
**/*.json export-ignore
**/*.yaml export-ignore
**/*.yml export-ignore
**/*.toml export-ignore
**/*.code-* export-ignore
**/*.md export-ignore
scripts export-ignore
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ celerybeat.pid
*.sage.py

# Environments
.env
.env.local.secrets
.venv
env/
venv/
Expand Down
21 changes: 10 additions & 11 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,31 @@
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

## ℹ️ HOW-TO: Make the python-package editable.
#
# 1. Comment out the git-codeforlife package under [packages].
# 2. Comment out the git-codeforlife package under [dev-packages].
# 3. Uncomment the editable-codeforlife package under [dev-packages].
# 1. Comment out the non-editable codeforlife package under [packages].
# 2. Comment out the non-editable codeforlife package under [dev-packages].
# 3. Uncomment the editable codeforlife package under [dev-packages].
# 4. Run `pipenv install --dev` in your terminal.
#
# ⚠️ Make sure you revert these changes before pushing your changes or the
# pipeline will fail to install the python-package.
#
## ℹ️ HOW-TO: Install a new version of the python-package.
#
# 1. Uncomment the git-codeforlife package under [packages].
# 2. Uncomment the git-codeforlife package under [dev-packages].
# 3. Comment out the editable-codeforlife package under [dev-packages].
# 4. Set the ref key of the git-codeforlife packages under [packages] and
# [dev-packages] to have the same version number.
# 1. Uncomment the non-editable codeforlife package under [packages].
# 2. Uncomment the non-editable codeforlife package under [dev-packages].
# 3. Comment out the editable codeforlife package under [dev-packages].
# 4. Set the tag of the editable codeforlife packages under [packages] and
# [dev-packages] to have the same tag.
# 5. Run `pipenv install --dev` in your terminal.

[packages]
codeforlife = {ref = "v0.20.0", git = "https://github.com/ocadotechnology/codeforlife-package-python.git"}
codeforlife = "==0.24.1"
# 🚫 Don't add [packages] below that are inherited from the CFL package.

[dev-packages]
codeforlife = {ref = "v0.20.0", git = "https://github.com/ocadotechnology/codeforlife-package-python.git", extras = ["dev"]}
codeforlife = {version = "==0.24.1", extras = ["dev"]}
# codeforlife = {file = "../codeforlife-package-python", editable = true, extras = ["dev"]}
# 🚫 Don't add [dev-packages] below that are inherited from the CFL package.

Expand Down
Loading
Loading