Porównaj commity

...

3 Commity

Autor SHA1 Wiadomość Data
Placeless 50df0f5134
Merge 64289e114d into c5a105f676 2024-04-09 15:48:43 -05:00
Rui Carmo c5a105f676
Update README.md 2024-04-08 15:27:15 +01:00
Placeless 64289e114d format by ruff 2023-12-27 20:34:56 +09:00
8 zmienionych plików z 1733 dodań i 957 usunięć

Wyświetl plik

@ -8,7 +8,7 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
### Documentation: [Install](#install) | [Using](#using-piku) | [Procfile](https://piku.github.io/configuration/procfile.html) | [ENV](https://piku.github.io/configuration/env.html) | [Examples](https://piku.github.io/community/examples.html) | [Roadmap](https://github.com/orgs/piku/projects/2) | [Contributing](https://piku.github.io/community/contributing.html) | [LinuxConf Talk](https://www.youtube.com/watch?v=ec-GoDukHWk) | [Fast Web App Tutorial](https://github.com/piku/webapp-tutorial) | [Discussion Forum](https://github.com/piku/piku/discussions)
### Documentation: [Install](#install) | [Using](#workflow) | [Procfile](https://piku.github.io/configuration/procfile.html) | [ENV](https://piku.github.io/configuration/env.html) | [Examples](https://piku.github.io/community/examples.html) | [Roadmap](https://github.com/orgs/piku/projects/2) | [Contributing](https://piku.github.io/community/contributing.html) | [LinuxConf Talk](https://www.youtube.com/watch?v=ec-GoDukHWk) | [Fast Web App Tutorial](https://github.com/piku/webapp-tutorial) | [Discussion Forum](https://github.com/piku/piku/discussions)
## [Install](https://piku.github.io/install)
@ -32,7 +32,7 @@ We wanted an Heroku/CloudFoundry-like way to deploy stuff on a few `ARM` boards,
`piku` is currently able to deploy, manage and independently scale multiple applications per host on both ARM and Intel architectures, and works on any cloud provider (as well as bare metal) that can run Python, `nginx` and `uwsgi`.
## Using `piku`
## Workflow
`piku` supports a Heroku-like workflow:
@ -97,4 +97,4 @@ But as a general rule, if it can be invoked from a shell, it can be run inside `
[raspi-cluster]: https://github.com/rcarmo/raspi-cluster
[cygwin]: http://www.cygwin.com
[wsl]: https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux
[wsl]: https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux

Wyświetl plik

@ -1,2 +1,3 @@
from distutils.core import setup
setup(name='piku-binary', version='0.0.1', scripts=['piku.py'])
setup(name="piku-binary", version="0.0.1", scripts=["piku.py"])

Wyświetl plik

@ -5,7 +5,7 @@ import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'pikudjango.settings')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pikudjango.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
@ -17,5 +17,5 @@ def main():
execute_from_command_line(sys.argv)
if __name__ == '__main__':
if __name__ == "__main__":
main()

Wyświetl plik

@ -20,7 +20,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'eu0^r0ilw-vkeh&n6%4mdkz0b+#e@tw1orypf)lcw5=#!z(6j1'
SECRET_KEY = "eu0^r0ilw-vkeh&n6%4mdkz0b+#e@tw1orypf)lcw5=#!z(6j1"
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
@ -31,58 +31,58 @@ ALLOWED_HOSTS = [os.environ.get("NGINX_SERVER_NAME", "")]
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]
ROOT_URLCONF = 'pikudjango.urls'
ROOT_URLCONF = "pikudjango.urls"
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.template.context_processors.debug",
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
],
},
},
]
WSGI_APPLICATION = 'pikudjango.wsgi.application'
WSGI_APPLICATION = "pikudjango.wsgi.application"
# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
}
}
DB = os.environ.get("NGINX_SERVER_NAME", None)
if DB:
DATABASES["default"]["ENGINE"] = 'django.db.backends.postgresql_psycopg2'
DATABASES["default"]["ENGINE"] = "django.db.backends.postgresql_psycopg2"
DATABASES["default"]["NAME"] = DB
@ -91,16 +91,16 @@ if DB:
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
},
]
@ -108,9 +108,9 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# https://docs.djangoproject.com/en/2.2/topics/i18n/
LANGUAGE_CODE = 'en-us'
LANGUAGE_CODE = "en-us"
TIME_ZONE = 'UTC'
TIME_ZONE = "UTC"
USE_I18N = True
@ -122,5 +122,5 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.2/howto/static-files/
STATIC_URL = '/static/'
STATIC_URL = "/static/"
STATIC_ROOT = os.path.join(BASE_DIR, "static")

Wyświetl plik

@ -17,5 +17,5 @@ from django.contrib import admin
from django.urls import path
urlpatterns = [
path('admin/', admin.site.urls),
path("admin/", admin.site.urls),
]

Wyświetl plik

@ -11,6 +11,6 @@ import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'pikudjango.settings')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pikudjango.settings")
application = get_wsgi_application()

Plik diff jest za duży Load Diff

1320
piku.py

Plik diff jest za duży Load Diff