Compare commits

...

11 Commits

Author SHA1 Message Date
ducoterra
5efb93ea68 don't zoom on double tap 2020-04-25 15:03:03 -04:00
ducoterra
1ee6b890ef remove snippets urls for now 2020-04-25 12:58:31 -04:00
ducoterra
18aab648c6 you have got to be kidding me 2020-04-25 12:34:03 -04:00
ducoterra
57328a7fc8 need secret mounts 2020-04-25 12:30:04 -04:00
ducoterra
948569a659 spacing... spacing 2020-04-25 12:21:31 -04:00
ducoterra
50cdfd8180 wrong configmap 2020-04-25 12:14:42 -04:00
ducoterra
8393efa3a6 fix yaml find and replace 2020-04-25 12:08:03 -04:00
ducoterra
b3db1816bb list dir 2020-04-25 12:01:07 -04:00
ducoterra
7123f4c389 rogue ' 2020-04-25 11:57:16 -04:00
ducoterra
477ddfe165 forgot quote 2020-04-25 11:52:15 -04:00
ducoterra
6bc472f7fe fix default environment vars 2020-04-25 11:20:15 -04:00
9 changed files with 44 additions and 8 deletions

View File

@@ -43,7 +43,8 @@ deploy:
- curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
- chmod +x ./kubectl
- mkdir /deploy
- for f in $(find k8s -regex '.*\\.ya*ml); do envsubst < $f > "/deploy/$(basename $f)"; done'
- for f in $(find k8s -regex '.*\.ya*ml'); do envsubst < $f > "/deploy/$(basename $f)"; done
- ./kubectl apply -f /deploy
- ./kubectl rollout status deploy $DEPLOY
- ./kubectl exec $(./kubectl get pods --selector=app=$DEPLOY --output=jsonpath='{.items[*].metadata.name}') -- python manage.py migrate
- POD=$(./kubectl get pods --selector=app=$DEPLOY --output=jsonpath='{.items[*].metadata.name}')
- ./kubectl exec $POD -- python manage.py migrate

13
.vscode/launch.json vendored
View File

@@ -5,7 +5,7 @@
"version": "0.2.0",
"configurations": [
{
"name": "Python: Django",
"name": "Test",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
@@ -13,6 +13,17 @@
"test",
],
"django": true
},
{
"name": "Run Server",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": [
"runserver",
"--noreload"
],
"django": true
}
]
}

View File

@@ -25,7 +25,7 @@ SECRET_KEY = os.getenv("SECRET_KEY")
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True if os.getenv("DEBUG") == "True" else False
ALLOWED_HOSTS = os.getenv("ALLOWED_HOSTS").split(",")
ALLOWED_HOSTS = os.getenv("ALLOWED_HOSTS", "localhost").split(",")
# Application definition

View File

@@ -18,7 +18,7 @@ from django.urls import path, include
from django.http import JsonResponse
urlpatterns = [
path('', include('api.urls')),
# path('api/', include('api.urls')),
path('', include('ui.urls')),
path('admin/', admin.site.urls),
]

View File

@@ -16,7 +16,9 @@ spec:
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
envFrom:
- configMapRef:
name: gitlab
name: $DEPLOY
- secretRef:
name: django-secrets
volumeMounts:
- mountPath: /app/db
name: $DEPLOY

View File

@@ -6,7 +6,7 @@ import sys
def main():
os.environ.setdefault('DEBUG', 'True')
os.environ.setdefault('SECRET', 'SeVOOxOHISQZv82RfCPds0B2l8M6jGju4G8F-GcuSrc')
os.environ.setdefault('SECRET_KEY', 'SeVOOxOHISQZv82RfCPds0B2l8M6jGju4G8F-GcuSrc')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
try:
from django.core.management import execute_from_command_line

View File

@@ -0,0 +1,20 @@
html, body {
height: 100%;
width: 100%;
}
.section, .container {
height: 100%;
}
.container {
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
text-align: center;
}
.disable-dbl-tap-zoom {
touch-action: manipulation;
}

View File

@@ -20,6 +20,7 @@ var count = document.getElementById("COUNT");
button.addEventListener("click", event => {
button.disabled = true;
button.classList.add("is-loading");
fetch('/button', {
method: 'POST',
headers: {
@@ -34,6 +35,7 @@ button.addEventListener("click", event => {
count.innerText = data.pressed;
}).finally(() => {
button.disabled = false;
button.classList.remove("is-loading");
});
});

View File

@@ -18,7 +18,7 @@
<h1 class="title">
The Button
</h1>
<button class="button is-primary" id="BUTTON">Press</button>
<button class="button is-primary disable-dbl-tap-zoom" id="BUTTON">Press</button>
</div>
<div><br></div>
<div>