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

deploy to aws #14

Merged
merged 2 commits into from
Nov 1, 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
13 changes: 0 additions & 13 deletions .gcloudignore

This file was deleted.

3 changes: 0 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
"localhost:8000"
],
"django": true,
"env": {
"SERVICE_NAME": "replace-me"
},
"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,11 +23,11 @@ name = "pypi"
# 5. Run `pipenv install --dev` in your terminal.

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

[dev-packages]
codeforlife = {ref = "v0.19.0", 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,260 changes: 676 additions & 584 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.

2 changes: 1 addition & 1 deletion scripts/run
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ set -e

cd "${BASH_SOURCE%/*}/.."

wget -O - https://raw.githubusercontent.com/ocadotechnology/codeforlife-workspace/main/scripts/backend/run | SERVICE_NAME=replace-me bash
wget -O - https://raw.githubusercontent.com/ocadotechnology/codeforlife-workspace/main/scripts/backend/run | bash
2 changes: 1 addition & 1 deletion scripts/setup
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ set -e

cd "${BASH_SOURCE%/*}/.."

wget -O - https://raw.githubusercontent.com/ocadotechnology/codeforlife-workspace/main/scripts/backend/setup | SERVICE_NAME=replace-me bash
wget -O - https://raw.githubusercontent.com/ocadotechnology/codeforlife-workspace/main/scripts/backend/setup | bash
6 changes: 5 additions & 1 deletion settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@
https://docs.djangoproject.com/en/3.2/ref/settings/
"""

import os
from pathlib import Path

# pylint: disable-next=wildcard-import,unused-wildcard-import
# NOTE: Must come before importing CFL settings.
os.environ["SERVICE_NAME"] = "REPLACE_ME"

# pylint: disable-next=wildcard-import,unused-wildcard-import,wrong-import-position
from codeforlife.settings import *

# Build paths inside the project like this: BASE_DIR / 'subdir'.
Expand Down