Compare commits

...

2 Commits

Author SHA1 Message Date
5b2110d6e0 update images tag 2024-07-12 09:17:47 +00:00
a62be9b5e7 change deployment url to /deployments 2023-09-26 13:58:14 +02:00
8 changed files with 19 additions and 19 deletions

View File

@ -14,10 +14,10 @@ django:
docker build . -t mumui:local
pushpin-local:
cd pushpin && docker build . -t pushpin:local
cd pushpin && docker build . -t pushpin:mumui
nginx-local:
cd nginx && docker build . -t nginx:local
cd nginx && docker build . -t nginx:mumui
build:
$(MAKE) pushpin-local

View File

@ -4,7 +4,7 @@ from django.urls import path, include
from deployment.views import index, create, details, deploy, abort
urlpatterns = [
path("", index, name="deployment"),
path("", index, name="deployments"),
path("create", create, name="deployment-create"),
path("<uuid:deployment_id>", details, name="deployment-details"),
path("<uuid:deployment_id>/deploy", deploy, name="deployment-launch"),
@ -13,7 +13,7 @@ urlpatterns = [
"events/<user_id>/",
include(django_eventstream.urls),
{"format-channels": ["deployment_{user_id}"]},
name="deployment-events",
name="deployments-events",
),
path(
"events/<user_id>/<deployment_id>/",

View File

@ -71,9 +71,9 @@ def deploy(request, deployment_id):
launch_deploy.delay(deployment_id)
if page := request.GET.get("page", ""):
return HttpResponseRedirect(f"/deployment?page={page}")
return HttpResponseRedirect(f"/deployments?page={page}")
return HttpResponseRedirect("/deployment")
return HttpResponseRedirect("/deployments")
def abort(request, deployment_id):
@ -95,7 +95,7 @@ def abort(request, deployment_id):
Event.send_details(deployment, progress)
Event.send(deployment)
return HttpResponseRedirect(f"/deployment/{deployment.id}")
return HttpResponseRedirect(f"/deployments/{deployment.id}")
def details(request, deployment_id):
@ -116,7 +116,7 @@ def details(request, deployment_id):
deployment.delete()
except Exception as e:
return HttpResponseServerError(e)
return HttpResponseRedirect("/deployment")
return HttpResponseRedirect("/deployments")
return render(
request,
@ -145,4 +145,4 @@ def create(request):
except Exception as e:
return HttpResponseServerError(e)
return HttpResponseRedirect("/deployment")
return HttpResponseRedirect("/deployments")

View File

@ -2,15 +2,15 @@ version: '3'
services:
redis:
image: redis/redis-stack-server:latest
container_name: redis
container_name: redis-mumui
networks:
- mumui_network
volumes:
- redis_data:/data
pushpin:
image: pushpin:local
container_name: pushpin
image: pushpin:mumui
container_name: pushpin-mumui
networks:
- mumui_network
depends_on:
@ -18,7 +18,7 @@ services:
postgres:
image: postgres:latest
container_name: postgres
container_name: postgres-mumui
env_file:
- .env
networks:
@ -39,8 +39,8 @@ services:
- postgres
nginx:
image: nginx:local
container_name: nginx
image: nginx:mumui
container_name: nginx-mumui
networks:
- mumui_network
volumes:

View File

@ -21,6 +21,6 @@ from django.views.generic.base import TemplateView
urlpatterns = [
path("admin/", admin.site.urls),
path("accounts/", include("django.contrib.auth.urls")),
path("deployment/", include("deployment.urls")),
path("deployments/", include("deployment.urls")),
path("", TemplateView.as_view(template_name="home.html"), name="home"),
]

View File

@ -92,7 +92,7 @@
{% endif %}
<script>
function goBack() {
window.location={% url 'deployment' %};
window.location={% url 'deployments' %};
}
</script>
{% endblock %}

View File

@ -15,7 +15,7 @@
<a class="nav-link" href="/">Home</a>
</li>
<li class="nav-item">
<a href="{% url 'deployment' %}" class="nav-link">Deployments</a></li>
<a href="{% url 'deployments' %}" class="nav-link">Deployments</a></li>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About</a></li>

View File

@ -13,7 +13,7 @@
<div class="row justify-content-md-center">
<div class="col-lg-6 col-md-8 col-sm-8">
<div style="text-align: center;">Forget, i don't care... Please go on
<a href="{% url 'deployment' %}">Deployments</a>
<a href="{% url 'deployments' %}">Deployments</a>
and enjoy the life !
</div>
</div>