Skip to content

Commit

Permalink
deploy to aws (#367)
Browse files Browse the repository at this point in the history
* deploy to aws

* new cfl package
  • Loading branch information
SKairinos authored Nov 1, 2024
1 parent db5f802 commit a0821a5
Show file tree
Hide file tree
Showing 9 changed files with 690 additions and 629 deletions.
14 changes: 0 additions & 14 deletions .gcloudignore

This file was deleted.

4 changes: 0 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
"localhost:8000"
],
"django": true,
"env": {
"SERVICE_IS_ROOT": "1",
"SERVICE_NAME": "portal"
},
"justMyCode": false,
"name": "Django Server",
"preLaunchTask": "setup",
Expand Down
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.19.2", git = "https://github.com/ocadotechnology/codeforlife-package-python.git"}
codeforlife = {ref = "v0.20.0", git = "https://github.com/ocadotechnology/codeforlife-package-python.git"}
# 🚫 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.19.2", git = "https://github.com/ocadotechnology/codeforlife-package-python.git", extras = ["dev"]}
codeforlife = {ref = "v0.20.0", git = "https://github.com/ocadotechnology/codeforlife-package-python.git", 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
1,236 changes: 664 additions & 572 deletions Pipfile.lock

Large diffs are not rendered by default.

18 changes: 0 additions & 18 deletions app.yaml

This file was deleted.

20 changes: 20 additions & 0 deletions application.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""
© Ocado Group
Created on 11/04/2024 at 16:51:45(+01:00).
The entrypoint to our app.
"""

import os

from codeforlife.app import StandaloneApplication
from django.core.asgi import get_asgi_application
from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")


if __name__ == "__main__":
StandaloneApplication(app=get_asgi_application()).run()
else:
app = get_wsgi_application()
16 changes: 0 additions & 16 deletions main.py

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/setup
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ set -e

cd "${BASH_SOURCE%/*}"

export SERVICE_IS_ROOT="1"
export SERVICE_NAME="portal"

pipenv install --dev
export STATIC_MODE="default" # TODO: Remove after RR FE restructure
pipenv run python ../manage.py migrate --noinput
Expand Down
4 changes: 4 additions & 0 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
import os
from pathlib import Path

# NOTE: Must come before importing CFL settings.
os.environ["SERVICE_NAME"] = "portal"
os.environ["SERVICE_IS_ROOT"] = "1"

# Custom

EMAIL_VERIFICATION_TIMEOUT = 60 * 60 * 24
Expand Down

0 comments on commit a0821a5

Please sign in to comment.