This commit is contained in:
parent
0ef971cec4
commit
d664f42966
6 changed files with 9 additions and 3 deletions
|
|
@ -42,6 +42,6 @@ jobs:
|
|||
sudo docker pull 764709663363.dkr.ecr.ap-south-2.amazonaws.com/customer-website-backend:latest
|
||||
sudo docker stop customer-website-backend || true
|
||||
sudo docker rm customer-website-backend || true
|
||||
sudo docker run -d --name customer-website-backend -p 8000:8000 --restart always 764709663363.dkr.ecr.ap-south-2.amazonaws.com/customer-website-backend:latest
|
||||
sudo docker run -d --name customer-website-backend -p 8082:8000 --restart always 764709663363.dkr.ecr.ap-south-2.amazonaws.com/customer-website-backend:latest
|
||||
sudo docker image prune -a -f
|
||||
EOF
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ User=ubuntu
|
|||
WorkingDirectory=/home/ubuntu/customer_website_backend
|
||||
EnvironmentFile=/home/ubuntu/customer_website_backend/.env
|
||||
ExecStart=/home/ubuntu/customer_website_backend/venv/bin/gunicorn customerwebsitebackend.wsgi:application \
|
||||
--bind 0.0.0.0:8000 \
|
||||
--bind 0.0.0.0:8082 \
|
||||
--workers 3 \
|
||||
--access-logfile /home/ubuntu/customer_website_backend/logs/gunicorn-access.log \
|
||||
--error-logfile /home/ubuntu/customer_website_backend/logs/gunicorn-error.log \
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -25,7 +25,7 @@ SECRET_KEY = 'django-insecure-x4vu3x(e^g*(3x@2bzc$l$ux#5zee95b!2w)-vn*la@pn#ou!s
|
|||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
|
||||
# Application definition
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
from django.http import JsonResponse
|
||||
|
||||
def home_view(request):
|
||||
return JsonResponse({"message": "Django E-commerce Customer API is running successfully."})
|
||||
|
||||
from django.contrib import admin
|
||||
from django.urls import path
|
||||
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView
|
||||
|
|
@ -6,6 +11,7 @@ from products.views import CategoryListView, ProductListView, ProductDetailView
|
|||
from orders.views import CartView, CartItemDetailView, CheckoutView, PaymentSuccessView, OrderHistoryView, OrderDetailView
|
||||
|
||||
urlpatterns = [
|
||||
path('', home_view, name='home'),
|
||||
path('admin/', admin.site.urls),
|
||||
|
||||
# Auth APIs
|
||||
|
|
|
|||
Loading…
Reference in a new issue