فهرست منبع

Parametrage deploiement

omassot 7 سال پیش
والد
کامیت
514a5b2e01
5فایلهای تغییر یافته به همراه7 افزوده شده و 113 حذف شده
  1. 1 1
      backlog/settings.py
  2. 4 4
      backlog/urls.py
  3. 0 106
      initd
  4. 2 1
      requirements.txt
  5. 0 1
      runserver.cmd

+ 1 - 1
backlog/settings.py

@@ -83,7 +83,7 @@ DATABASES = {
         'PORT': '5432',
     }
 }
-    
+
 
 # Password validation
 # https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators

+ 4 - 4
backlog/urls.py

@@ -18,8 +18,8 @@ from django.urls import path, include
 
 
 urlpatterns = [
-    path('backlog/', include('main.urls')),
-    path('backlog/admin/', admin.site.urls, name='admin'),
-    path('backlog/accounts/', include('django.contrib.auth.urls')),
-    path('backlog/martor/', include('martor.urls')),
+    path('', include('main.urls')),
+    path('admin/', admin.site.urls, name='admin'),
+    path('accounts/', include('django.contrib.auth.urls')),
+    path('martor/', include('martor.urls')),
 ]

+ 0 - 106
initd

@@ -1,106 +0,0 @@
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides:          FastCGI servers for Django
-# Required-Start:    networking
-# Required-Stop:     networking
-# Default-Start:     2 3 4 5
-# Default-Stop:      S 0 1 6
-# Short-Description: Start FastCGI servers with Django.
-# Description:       Django, in order to operate with FastCGI, must be started
-#                    in a very specific way with manage.py. This must be done
-#                    for each DJango web server that has to run.
-### END INIT INFO
-#
-# Author:  Guillermo Fernandez Castellanos
-#          <guillermo.fernandez.castellanos AT gmail.com>.
-#
-# Version: @(#)fastcgi 0.1 11-Jan-2007 guillermo.fernandez.castellanos AT gmail.com
-#
-
-#### SERVER SPECIFIC CONFIGURATION
-DJANGO_SITES="backlog"
-SITES_PATH=/var/www
-RUNFILES_PATH=$SITES_PATH/run
-HOST=127.0.0.1
-PORT_START=8008
-RUN_AS=sig
-FCGI_METHOD=threaded
-#### DO NOT CHANGE ANYTHING AFTER THIS LINE!
-
-set -e
-
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DESC="FastCGI servers"
-NAME=$0
-SCRIPTNAME=/etc/init.d/$NAME
-
-#
-#       Function that starts the daemon/service.
-#
-d_start()
-{
-    # Starting all Django FastCGI processes
-    PORT=$PORT_START
-    for SITE in $DJANGO_SITES
-    do
-        echo -n ", $SITE"
-        if [ -f $RUNFILES_PATH/$SITE.pid ]; then
-            echo -n " already running"
-        else
-            start-stop-daemon --start --quiet \
-                       --pidfile $RUNFILES_PATH/$SITE.pid \
-                       --chuid $RUN_AS --exec /usr/bin/env -- python \
-                       $SITES_PATH/$SITE/manage.py runfcgi \
-                       method=$FCGI_METHOD \
-                       host=$HOST port=$PORT pidfile=$RUNFILES_PATH/$SITE.pid
-            chmod 400 $RUNFILES_PATH/$SITE.pid
-        fi
-        let "PORT = $PORT + 1"
-    done
-}
-
-#
-#       Function that stops the daemon/service.
-#
-d_stop() {
-    # Killing all Django FastCGI processes running
-    for SITE in $DJANGO_SITES
-    do
-        echo -n ", $SITE"
-        start-stop-daemon --stop --quiet --pidfile $RUNFILES_PATH/$SITE.pid \
-                          || echo -n " not running"
-        if [ -f $RUNFILES_PATH/$SITE.pid ]; then
-           rm -f $RUNFILES_PATH/$SITE.pid
-        fi
-    done
-}
-
-ACTION="$1"
-case "$ACTION" in
-    start)
-        echo -n "Starting $DESC: $NAME"
-        d_start
-        echo "."
-        ;;
-
-    stop)
-        echo -n "Stopping $DESC: $NAME"
-        d_stop
-        echo "."
-        ;;
-
-    restart|force-reload)
-        echo -n "Restarting $DESC: $NAME"
-        d_stop
-        sleep 1
-        d_start
-        echo "."
-        ;;
-
-    *)
-        echo "Usage: $NAME {start|stop|restart|force-reload}" >&2
-        exit 3
-        ;;
-esac
-
-exit 0

+ 2 - 1
requirements.txt

@@ -1,4 +1,5 @@
 psycopg2
 Django
 martor
-path.py>=11.1.0
+path.py>=11.1.0
+mod_wsgi

+ 0 - 1
runserver.cmd

@@ -1 +0,0 @@
-python manage.py runserver 8008