Skip to content

Commit

Permalink
Merge pull request #8 from NeoUKR/NeoUKR
Browse files Browse the repository at this point in the history
0.1.2.0 Release
  • Loading branch information
NeoUKR authored Nov 7, 2022
2 parents e71c14f + d57f229 commit 3221c0f
Show file tree
Hide file tree
Showing 116 changed files with 811 additions and 66 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vscode
.idea
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/.idea/
/.vscode/
/venv/
db.sqlite3
djangoapp.log
28 changes: 16 additions & 12 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@
path = pullgerFootPrint/com/linkedin
url = https://github.com/PullgerFootPrint/com--linkedin.git
branch = NeoUKRcd
[submodule "pullgerMultisessionManager"]
path = pullgerMultisessionManager
url = https://github.com/Pullger/pullgerMultisessionManager.git
branch = NeoUKR
[submodule "pullgerMultisessionManager_FRONT"]
path = pullgerMultisessionManager_FRONT
url = https://github.com/Pullger/pullgerMultisessionManager_FRONT.git
branch = NeoUKR
[submodule "pullgerMultisessionManager_REST"]
path = pullgerMultisessionManager_REST
url = https://github.com/Pullger/pullgerMultisessionManager_REST.git
branch = NeoUKR
[submodule "pullgerDomain/com/linkedin"]
path = pullgerDomain/com/linkedin
url = https://github.com/PullgerDomain/com--linkedin.git
Expand Down Expand Up @@ -50,3 +38,19 @@
path = pullgerReflection/com_linkedin__TT
url = https://github.com/PullgerReflection/com_linkedin__TT.git
branch = NeoUKR
[submodule "pullgerReflection/com_linkedin__REST"]
path = pullgerReflection/com_linkedin__REST
url = https://github.com/PullgerReflection/com_linkedin__REST.git
branch = NeoUKR
[submodule "pullgerMultiSessionManager"]
path = pullgerMultiSessionManager
url = https://github.com/Pullger/pullgerMultiSessionManager.git
branch = NeoUKR
[submodule "pullgerMultiSessionManager__REST"]
path = pullgerMultiSessionManager__REST
url = https://github.com/Pullger/pullgerMultiSessionManager__REST.git
branch = NeoUKR
[submodule "pullgerInternalControl"]
path = pullgerInternalControl
url = https://github.com/Pullger/pullgerInternalControl.git
branch = NeoUKR
54 changes: 54 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Python and Linux Version
# FROM python:3.10.0a1-alpine3.12
FROM python:3.11.0rc2-bullseye

# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

COPY requirements.txt /app/requirements.txt

# Configure server
# RUN set -ex \
# && pip install --upgrade pip \
# && pip install --no-cache-dir -r /app/requirements.txt

RUN ["apt-get", "update"]
RUN ["apt-get", "-y", "install", "vim"]

# Install chrome driver and selenium
RUN mkdir ./app/tmp/
WORKDIR /app/tmp

RUN version=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE") && \
wget -qP /app/tmp/ "https://chromedriver.storage.googleapis.com/${version}/chromedriver_linux64.zip"
RUN unzip -o chromedriver_linux64.zip -d /usr/local/bin
RUN chmod 755 /usr/local/bin/chromedriver

RUN ["wget", "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"]
RUN apt-get -y install /app/tmp/google-chrome-stable_current_amd64.deb



# Install libraries
RUN pip install --upgrade pip
RUN pip install -r /app/requirements.txt

# Working directory
WORKDIR /app

ADD . .

# RUN python3 manage.py test pullgerReflection.com_linkedin.tests.end_to_end

# EXPOSE 8000

# CMD ["gunicorn", "--bind", ":8000", "--workers", "3", "core.wsgi:application"]

# CMD gunicorn config.wsgi:application --bind 0.0.0.0:$PORT

# CMD ["gunicorn", "config.wsgi:application", "--bind", "0.0.0.0:$PORT"]

CMD python manage.py runserver 0.0.0.0:$PORT

# CMD ["bash"]
50 changes: 50 additions & 0 deletions Dockerfile.debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Python and Linux Version
# FROM python:3.10.0a1-alpine3.12
FROM python:3.11.0rc2-bullseye

# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

COPY requirements.txt /app/requirements.txt

# Configure server
# RUN set -ex \
# && pip install --upgrade pip \
# && pip install --no-cache-dir -r /app/requirements.txt

RUN ["apt-get", "update"]
RUN ["apt-get", "-y", "install", "vim"]

# Install chrome driver and selenium
RUN mkdir ./app/tmp/
WORKDIR /app/tmp

RUN version=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE") && \
wget -qP /app/tmp/ "https://chromedriver.storage.googleapis.com/${version}/chromedriver_linux64.zip"
RUN unzip -o chromedriver_linux64.zip -d /usr/local/bin
RUN chmod 755 /usr/local/bin/chromedriver

RUN ["wget", "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"]
RUN apt-get -y install /app/tmp/google-chrome-stable_current_amd64.deb



# Install libraries
RUN pip install --upgrade pip
RUN pip install -r /app/requirements.txt

# Working directory
WORKDIR /app

ADD . .

# RUN python3 manage.py test pullgerReflection.com_linkedin.tests.end_to_end

# EXPOSE 8000

# CMD ["gunicorn", "--bind", ":8000", "--workers", "3", "core.wsgi:application"]

# CMD gunicorn config.wsgi:application --bind 0.0.0.0:8000

CMD ["bash"]
50 changes: 50 additions & 0 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Python and Linux Version
# FROM python:3.10.0a1-alpine3.12
FROM python:3.11.0rc2-bullseye

# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

COPY requirements.txt /app/requirements.txt

# Configure server
# RUN set -ex \
# && pip install --upgrade pip \
# && pip install --no-cache-dir -r /app/requirements.txt

RUN ["apt-get", "update"]
RUN ["apt-get", "-y", "install", "vim"]

# Install chrome driver and selenium
RUN mkdir ./app/tmp/
WORKDIR /app/tmp

RUN version=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE") && \
wget -qP /app/tmp/ "https://chromedriver.storage.googleapis.com/${version}/chromedriver_linux64.zip"
RUN unzip -o chromedriver_linux64.zip -d /usr/local/bin
RUN chmod 755 /usr/local/bin/chromedriver

RUN ["wget", "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"]
RUN apt-get -y install /app/tmp/google-chrome-stable_current_amd64.deb



# Install libraries
RUN pip install --upgrade pip
RUN pip install -r /app/requirements.txt

# Working directory
WORKDIR /app

ADD . .

# RUN python3 manage.py test pullgerReflection.com_linkedin.tests.end_to_end

# CMD ["gunicorn", "--bind", ":8000", "--workers", "3", "core.wsgi:application"]

# CMD gunicorn config.wsgi:application --bind 0.0.0.0:8000

EXPOSE 8000

CMD ["bash","test_script.sh"]
1 change: 1 addition & 0 deletions config/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .version import *
Binary file added config/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file added config/__pycache__/asgi.cpython-38.pyc
Binary file not shown.
Binary file added config/__pycache__/settings.cpython-38.pyc
Binary file not shown.
Binary file added config/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file added config/__pycache__/version.cpython-38.pyc
Binary file not shown.
Binary file added config/__pycache__/wsgi.cpython-38.pyc
Binary file not shown.
32 changes: 22 additions & 10 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['*']


# Application definition
Expand All @@ -42,17 +42,19 @@

PROJECT_INSTALLED_APPS = [
'pullgerAccountManager',
'pullgerAccountManager__REST',
'pullgerAuthJWT',
'pullgerMultisessionManager',
'pullgerMultisessionManager_REST',
'pullgerMultisessionManager_FRONT',
'pullgerMultiSessionManager',
'pullgerMultiSessionManager__REST',
'pullgerReflection.com_linkedin',
'pullgerReflection.com_linkedin__TT',
'pullgerDevelopmentFramework'
]

EXTERNAL_INSTALLED_APPS = [
'rest_framework',
'rest_framework.authtoken',
'corsheaders',
]

INSTALLED_APPS = STANDARD_INSTALLED_APPS + PROJECT_INSTALLED_APPS + EXTERNAL_INSTALLED_APPS
Expand All @@ -65,6 +67,8 @@
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware'
]

ROOT_URLCONF = 'config.urls'
Expand Down Expand Up @@ -146,7 +150,9 @@
# Disable Django's logging setup
LOGGING_CONFIG = None

LOGLEVEL = os.environ.get('LOGLEVEL', 'INFO').upper()
# LOGLEVEL = os.environ.get('LOGLEVEL', 'INFO').upper()
LOGLEVEL = os.environ.get('LOGLEVEL', 'DEBUG').upper()


logging.config.dictConfig({
'version': 1,
Expand All @@ -155,20 +161,21 @@
'default': {
# exact format is not important, this is the minimum information
# 'format': '%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
'format': '%(levelname)s %(asctime)s - %(name)s\n\t{process: %(process)s module: [%(module)s] line: %(lineno)d}\n\t%(relativeCreated)6d %(threadName)s\n\t\t%(message)s'
# 'format': '%(levelname)s %(asctime)s - %(name)s\n\treg uuid: %(reg)s\n\tfunction: [%(call_func)s] line: %(call_line)d module: [%(call_file)s]\n\tprocess: %(process)s relative: %(relativeCreated)6d %(threadName)s\n\t\t%(message)s'
'format': '%(levelname)s %(asctime)s - %(name)s\n\tprocess: %(process)s relative: %(relativeCreated)6d %(threadName)s\n\t\t%(message)s'
},
'django.server': DEFAULT_LOGGING['formatters']['django.server'],
},
'handlers': {
'file': {
'level': 'DEBUG',
'level': 'INFO',
'class': 'logging.FileHandler',
'formatter': 'default',
'filename': 'djangoapp.log',
'filename': './log/djangoapp.log',
},
# console logs to stderr
'console': {
'level': 'WARNING',
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'default',
},
Expand All @@ -179,6 +186,7 @@
'': {
'level': LOGLEVEL,
'handlers': ['file'],
# 'handlers': ['file'],
},
# Our application code
# 'app': {
Expand All @@ -196,4 +204,8 @@
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework.authentication.TokenAuthentication',
],
}
}

# TEMP_BASE_DIR = Path(__file__).resolve().parent.parent

CORS_ORIGIN_ALLOW_ALL = True
6 changes: 4 additions & 2 deletions config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

urlpatterns = [
path('admin/', admin.site.urls),
path('pullgerMM/', include('pullgerMultisessionManager_FRONT.urls')),
path('pullgerMM/api/', include('pullgerMultisessionManager_REST.urls')),
# path('pullgerMM/', include('pullgerMultiSessionManager__FRONT.urls')),
path('pullgerMSM/api/', include('pullgerMultiSessionManager__REST.urls')),
path('pullgerAM/api/', include('pullgerAccountManager__REST.urls')),
path('pullgerR/com_linkedin/api/', include('pullgerReflection.com_linkedin__REST.urls')),
path('api/account/', include('pullgerAuthJWT.urls')),
]
23 changes: 23 additions & 0 deletions config/version.history
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Version history [pullgerLinkedIN_FULL]

{0.2.0.0} [pullgerLinkedIN_FULL]
- cumulative update

{0.1.2.0} [pullgerLinkedIN_FULL]
- fixing

{0.1.1.0} [pullgerLinkedIN_FULL]
- add submodule [pullgerInternalControl]

{0.1.0.0} [pullgerLinkedIN_FULL]
- cumulative update

{0.0.3.0} [pullgerLinkedIN_FULL]
- [pullgerMultiSessionManager] {0.0.3.0}

{0.0.2.0} [pullgerLinkedIN_FULL]
- [pullgerExceptions] {0.0.1.0}
- [pullgerReflection/com_linkedin__TT] {0.0.2.1}
- [pullgerReflection/com_linkedin] {0.0.5.1}

{0.0.1.0} [pullgerLinkedIN_FULL]
9 changes: 1 addition & 8 deletions config/version.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
VERSION = (0, 0, 2, 0)
VERSION = (0, 2, 0, 0)
VERSION_INFO = '.'.join(str(nv) for nv in VERSION)
__version__ = VERSION_INFO

# 0.0.2.0
# [pullgerExceptions] {0.0.1.0}
# [pullgerReflection/com_linkedin__TT] {0.0.2.1}
# [pullgerReflection/com_linkedin] {0.0.5.1}

# 0.0.1.0
2 changes: 1 addition & 1 deletion djTaskBrocker
Submodule djTaskBrocker updated 1 files
+1 −0 serealizers.py
2 changes: 2 additions & 0 deletions docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docker build -t linked_dj .
docker run --rm -t -i -p 8000:8000 linked_dj
4 changes: 4 additions & 0 deletions install_windows.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
python manage.py -r requirement.txt
python manage.py makemigrations pullgerAccountManager
python manage.py migrate
python manage.py createsuperuser
1 change: 1 addition & 0 deletions pullgerAccountManager__REST/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__pycache__
1 change: 1 addition & 0 deletions pullgerAccountManager__REST/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# pullgerMultiSessionManager_REST
Empty file.
Loading

0 comments on commit 3221c0f

Please sign in to comment.