Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5efb93ea68 | ||
|
|
1ee6b890ef | ||
|
|
18aab648c6 | ||
|
|
57328a7fc8 | ||
|
|
948569a659 | ||
|
|
50cdfd8180 | ||
|
|
8393efa3a6 | ||
|
|
b3db1816bb |
@@ -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
|
- 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
|
- chmod +x ./kubectl
|
||||||
- mkdir /deploy
|
- 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 apply -f /deploy
|
||||||
- ./kubectl rollout status deploy $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
13
.vscode/launch.json
vendored
@@ -5,7 +5,7 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "Python: Django",
|
"name": "Test",
|
||||||
"type": "python",
|
"type": "python",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/manage.py",
|
"program": "${workspaceFolder}/manage.py",
|
||||||
@@ -13,6 +13,17 @@
|
|||||||
"test",
|
"test",
|
||||||
],
|
],
|
||||||
"django": true
|
"django": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Run Server",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/manage.py",
|
||||||
|
"args": [
|
||||||
|
"runserver",
|
||||||
|
"--noreload"
|
||||||
|
],
|
||||||
|
"django": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -18,7 +18,7 @@ from django.urls import path, include
|
|||||||
from django.http import JsonResponse
|
from django.http import JsonResponse
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('', include('api.urls')),
|
# path('api/', include('api.urls')),
|
||||||
path('', include('ui.urls')),
|
path('', include('ui.urls')),
|
||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ spec:
|
|||||||
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: gitlab
|
name: $DEPLOY
|
||||||
|
- secretRef:
|
||||||
|
name: django-secrets
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /app/db
|
- mountPath: /app/db
|
||||||
name: $DEPLOY
|
name: $DEPLOY
|
||||||
|
|||||||
@@ -6,3 +6,15 @@ html, body {
|
|||||||
.section, .container {
|
.section, .container {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.disable-dbl-tap-zoom {
|
||||||
|
touch-action: manipulation;
|
||||||
|
}
|
||||||
@@ -20,6 +20,7 @@ var count = document.getElementById("COUNT");
|
|||||||
|
|
||||||
button.addEventListener("click", event => {
|
button.addEventListener("click", event => {
|
||||||
button.disabled = true;
|
button.disabled = true;
|
||||||
|
button.classList.add("is-loading");
|
||||||
fetch('/button', {
|
fetch('/button', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
@@ -34,6 +35,7 @@ button.addEventListener("click", event => {
|
|||||||
count.innerText = data.pressed;
|
count.innerText = data.pressed;
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
button.disabled = false;
|
button.disabled = false;
|
||||||
|
button.classList.remove("is-loading");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<h1 class="title">
|
<h1 class="title">
|
||||||
The Button
|
The Button
|
||||||
</h1>
|
</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>
|
||||||
<div><br></div>
|
<div><br></div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user