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 #370

Merged
merged 5 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
The table of contents is too big for display.
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
59 changes: 9 additions & 50 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# ------------------------------------------------------------------------------
# Backend
# ------------------------------------------------------------------------------
# Based off of https://github.com/github/gitignore/blob/main/Python.gitignore

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down Expand Up @@ -112,8 +109,10 @@ ipython_config.py
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
Expand All @@ -126,7 +125,7 @@ celerybeat.pid
*.sage.py

# Environments
.env
.env.local.secrets
.venv
env/
venv/
Expand Down Expand Up @@ -163,47 +162,7 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

# ------------------------------------------------------------------------------
# Frontend
# ------------------------------------------------------------------------------

# dependencies
*/node_modules
/.pnp
.pnp.js

# testing
coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# TODO: clean up below list
# Custom
.nyc_output
cypress/videos
cypress/screenshots
/src/.python-version
/src/*/static/react
/src/*/templates/portal.html
/static
*.sqlite3
/frontend/build
node_modules
.cache
package-lock.json
/package.json
/yarn.lock
#.idea/

# Django
static/
4 changes: 2 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ name = "pypi"
# 5. Run `pipenv install --dev` in your terminal.

[packages]
codeforlife = {ref = "v0.21.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.
pyjwt = "==2.6.0" # TODO: upgrade to latest version
# TODO: Needed by RR. Remove when RR has moved to new system.
Expand All @@ -32,7 +32,7 @@ django-sekizai = "==2.0.0"
django-classy-tags = "==2.0.0"

[dev-packages]
codeforlife = {ref = "v0.21.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