How to clone or run your project on local machine by cloning/connecting to Linode Server. what are requirements need to be installed on your Machine.

22 views
Skip to first unread message

chaitan

unread,
May 14, 2020, 3:28:02 PM5/14/20
to Django users
Hi every one,
I am hired as a Python/Django Developer. My company has deployed its Django application into LINODE  Server. I have experience using the Heroku server, 
but Pretty much new to this Linode server, have no clue about this. I want to run/Connect to project to that server to run locally on my machine.

I have access my GIT repo of project and cloned to my machine(windows), 

What are the requirements needed to run locally? What is the appropriate question to ask my Manager to get it done?

Please share any links/process to it.

Thanks in Advance.





Julio Cojom

unread,
May 14, 2020, 5:35:23 PM5/14/20
to django...@googlegroups.com
It must have a requirements.txt , so run pip install -r requirements.txt.

Next run all django stuff (manage.py makemigrations, manage.py migrate, manage.py runserver) 

if requirements.txt isnt in the git repo, you can do it running manage.py runserver and watching every error it throws and installing the missing packages or loggin in the server, making the requirements.txt and pushing to the repo.

Dont think linode as a new thing, its just a server, like any others.



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4e73ca52-7221-4fb3-83fb-493e9160eaec%40googlegroups.com.

chaitanya orakala

unread,
May 14, 2020, 9:45:12 PM5/14/20
to django...@googlegroups.com
Yes, You are correct. It has nothing to do with the server when I cloned it from Git. I did follow your Process but the Django app consists of multiple settings files for Production, Development, and Test.

I configured my own settings file and try to run the command 
Python manage.py runserver --settings=settings_sai 

Error: ModuleNotFoundError: No module named 'settings_dev_sai'

This is my settings.py file
***
import socket

#import settings depending on the box we are on
HOST = socket.gethostname()
TPA_CODE = "Bridge"
TPA_NAME = "Bridge Benefits System"

#development
if HOST == "BITS-DP-LAPTOP":
    from settings_dev import *
    TPA_NAME = "ICBA Benefit Services Ltd."
    TPA_CODE = 'ICBA'
#DFG bridge
elif HOST == "dfginternal":
    from settings_dfg_ees import *
    TPA_NAME = "Dehoney Financial Group"
    TPA_CODE = 'DFG'
#test
elif HOST == "DFGTEST02":
    from settings_staging import *
elif HOST == "icbaweb":
    from settings_production_icba import *
    TPA_NAME = "ICBA Benefit Services Ltd."
    TPA_CODE = 'ICBA'
elif HOST == "meritweb":
    from settings_production_merit import *
    TPA_NAME = "Ontario Construction Industry Benefit Plan"
    TPA_CODE = 'MERIT'
elif HOST == "dfgweb" :
    from settings_production_dfg import *
    TPA_NAME = "Dehoney Financial Group"
    TPA_CODE = 'DFG'
elif HOST == "dev" or HOST == "j-ubu" :
    from settings_dev_baikal import *
elif HOST == "jdev" :
    from settings_dev_juliab import *
elif HOST == "DESKTOP-QU02FDK":
    from settings_dev_sai import *
elif HOST == "johnstonesweb" :
    from settings_production_johnstones import *
    TPA_NAME = "Johnstone's Benefits"
    TPA_CODE = 'JOHNSTONES'
elif HOST == "bridgedemo" :
    from settings_demo import *
    TPA_CODE = "Bridge"
    TPA_NAME = "Bridge Benefits System"
else:
    raise ImportError("This server's hostname [" + HOST + "] does not have a proper expanded settings file. Please configure one.")

*******************
settings_dev_sai.py file

from settings_common import *

DEBUG = True
RUN_TYPE = RUN_DEV

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        #'NAME': 'bridge_icba',
        'NAME': 'bridge_js',
        #'NAME': 'bridge_dfg_internal',
        #'NAME': 'bridge_dfg',
        'HOST': 'localhost',
        'USER': 'django',
        'PASSWORD': 'bridge_user',
        'PORT': '',
    },
}

MEDIA_ROOT = 'C:/Users/DavidPiccione/Dropbox/Work - Bridge/Projects/bridge/MEDIA/'
MEDIA_URL = '/media/'

EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'bridgeautoma...@gmail.com'
EMAIL_HOST_PASSWORD = 'bridgeautomaticmessenger123'
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = 'bridgeautoma...@gmail.com'


STATIC_ROOT = ''
STATIC_URL = '/static/'
STATICFILES_DIRS = ("C:/Users/DavidPiccione/Dropbox/Work - Bridge/Projects/bridge/static",)
STATIC_PATH = 'C:/Users/DavidPiccione/Dropbox/Work - Bridge/Projects/bridge/static'

TEMPLATES = [
        {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': ["C:/Users/DavidPiccione/Dropbox/Work - Bridge/Projects/bridge/TEMPLATES",],
        'APP_DIRS': False,
        'OPTIONS': {
                'context_processors': [
                'django.contrib.auth.context_processors.auth',
                'django.template.context_processors.debug',
                'django.template.context_processors.i18n',
                'django.template.context_processors.media',
                'django.template.context_processors.static',
                'django.template.context_processors.tz',
                'django.template.context_processors.request',
                'django.contrib.messages.context_processors.messages',
                'bridge.context_processors.global_settings',],
                },
        },
]


USE_ASSOCIATION_BANK_ACCOUNTS = True
*******************************************

Please help me with this...


Reply all
Reply to author
Forward
0 new messages