forked from uncloud/uncloud
v3: start app
This commit is contained in:
parent
e1c2e22e64
commit
27462a4d0d
10 changed files with 37 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
all: requirements
|
||||
|
||||
run: requirements
|
||||
. ./env && python manage.py runserver
|
||||
|
||||
requirements: venv
|
||||
. ./venv/bin/activate && pip install -r requirements.txt
|
||||
|
||||
|
|
14
uncloud_v3/README.md
Normal file
14
uncloud_v3/README.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
## Kubernetes integration
|
||||
|
||||
### Development / Minikube
|
||||
|
||||
To setup a development environment, start minikube on your local
|
||||
machine. Use `kubectl get nodes` to verify minikube is up and running.
|
||||
|
||||
## Settings
|
||||
|
||||
### Environment variables / Settings / Environment
|
||||
|
||||
* `SECRET_KEY`
|
||||
* `DEBUG`
|
||||
* `DATABASE`
|
0
uncloud_v3/app/__init__.py
Normal file
0
uncloud_v3/app/__init__.py
Normal file
3
uncloud_v3/app/admin.py
Normal file
3
uncloud_v3/app/admin.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
6
uncloud_v3/app/apps.py
Normal file
6
uncloud_v3/app/apps.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class AppConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'app'
|
0
uncloud_v3/app/migrations/__init__.py
Normal file
0
uncloud_v3/app/migrations/__init__.py
Normal file
3
uncloud_v3/app/models.py
Normal file
3
uncloud_v3/app/models.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.db import models
|
||||
|
||||
# Create your models here.
|
3
uncloud_v3/app/tests.py
Normal file
3
uncloud_v3/app/tests.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
3
uncloud_v3/app/views.py
Normal file
3
uncloud_v3/app/views.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
|
@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/4.0/ref/settings/
|
|||
"""
|
||||
|
||||
from pathlib import Path
|
||||
import os
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
@ -20,7 +21,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'django-insecure-c9w3)1$s)n2c81&+i@=s5h$1frt9+)4to*i7_tbaei02=j-4bp'
|
||||
SECRET_KEY = os.environ['SECRET_KEY'] if 'SECRET_KEY' in os.environ else 'a bad secret key'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
|
Loading…
Reference in a new issue