Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixes and stability improvements #11

Open
wants to merge 1 commit into
base: withoutdockerdeploy
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# pull official base image
FROM python:3.7-slim-buster
RUN apt-get update \
&& apt-get -y install libpq-dev gcc \
&& pip install psycopg2

# set work directory
WORKDIR /usr/src/sc
Expand Down
3 changes: 2 additions & 1 deletion api/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django.conf.urls import url, include
from django.conf.urls import include
from django.urls import re_path as url
from django.urls import path
from rest_framework import routers, viewsets
from . import views
Expand Down
14 changes: 8 additions & 6 deletions nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ server {
}

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name screencast.weblikate.com;
# listen 443 ssl http2;
listen 80;
# listen [::]:443 ssl http2;
# server_name screencast.weblikate.com;
server_name localhost;

server_tokens off;
# server_tokens off;

ssl_certificate /etc/ssl/fullchain.pem;
ssl_certificate_key /etc/ssl/privkey.pem;
# ssl_certificate /etc/ssl/fullchain.pem;
# ssl_certificate_key /etc/ssl/privkey.pem;

location /static/ {
alias /sc/static/;
Expand Down
4 changes: 2 additions & 2 deletions nginx/dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM nginx

COPY ssl/fullchain.pem /etc/ssl/
COPY ssl/privkey.pem /etc/ssl/
# COPY ssl/fullchain.pem /etc/ssl/
# COPY ssl/privkey.pem /etc/ssl/
# RUN rm /etc/nginx/conf.d/default.conf
COPY ./default.conf /etc/nginx/conf.d/default.conf
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ django-heroku==0.3.1
django-oauth-toolkit==1.3.2
django-rest-framework-social-oauth2==1.1.0
djangorestframework==3.11.0
djangorestframework-simplejwt==4.4.0
djangorestframework-simplejwt
gunicorn==20.0.4
google-auth==1.6.3
idna==2.9
Expand Down
4 changes: 2 additions & 2 deletions screencast/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'scdata',
'USER': 'scback',
'PASSWORD': config('SQL_PASSWORD'),
'HOST': 'db', #change to 'HOST':'db'- for docker / in local development change it to 'localhost'
'PASSWORD':'scprince@123',
'HOST': 'localhost', #change to 'HOST':'db'- for docker / in local development change it to 'localhost'
'PORT': '5432',
}
}
Expand Down
57 changes: 36 additions & 21 deletions static/admin/css/autocomplete.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ select.admin-autocomplete {

.select2-container--admin-autocomplete.select2-container--focus .select2-selection,
.select2-container--admin-autocomplete.select2-container--open .select2-selection {
border-color: #999;
border-color: var(--body-quiet-color);
min-height: 30px;
}

Expand All @@ -29,13 +29,13 @@ select.admin-autocomplete {
}

.select2-container--admin-autocomplete .select2-selection--single {
background-color: #fff;
border: 1px solid #ccc;
background-color: var(--body-bg);
border: 1px solid var(--border-color);
border-radius: 4px;
}

.select2-container--admin-autocomplete .select2-selection--single .select2-selection__rendered {
color: #444;
color: var(--body-fg);
line-height: 30px;
}

Expand All @@ -46,7 +46,7 @@ select.admin-autocomplete {
}

.select2-container--admin-autocomplete .select2-selection--single .select2-selection__placeholder {
color: #999;
color: var(--body-quiet-color);
}

.select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow {
Expand Down Expand Up @@ -80,7 +80,7 @@ select.admin-autocomplete {
}

.select2-container--admin-autocomplete.select2-container--disabled .select2-selection--single {
background-color: #eee;
background-color: var(--darkened-bg);
cursor: default;
}

Expand All @@ -94,8 +94,8 @@ select.admin-autocomplete {
}

.select2-container--admin-autocomplete .select2-selection--multiple {
background-color: white;
border: 1px solid #ccc;
background-color: var(--body-bg);
border: 1px solid var(--border-color);
border-radius: 4px;
cursor: text;
}
Expand All @@ -104,16 +104,18 @@ select.admin-autocomplete {
box-sizing: border-box;
list-style: none;
margin: 0;
padding: 0 5px;
padding: 0 10px 5px 5px;
width: 100%;
display: flex;
flex-wrap: wrap;
}

.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__rendered li {
list-style: none;
}

.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__placeholder {
color: #999;
color: var(--body-quiet-color);
margin-top: 5px;
float: left;
}
Expand All @@ -123,11 +125,13 @@ select.admin-autocomplete {
float: right;
font-weight: bold;
margin: 5px;
position: absolute;
right: 0;
}

.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__choice {
background-color: #e4e4e4;
border: 1px solid #ccc;
background-color: var(--darkened-bg);
border: 1px solid var(--border-color);
border-radius: 4px;
cursor: default;
float: left;
Expand All @@ -137,15 +141,15 @@ select.admin-autocomplete {
}

.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__choice__remove {
color: #999;
color: var(--body-quiet-color);
cursor: pointer;
display: inline-block;
font-weight: bold;
margin-right: 2px;
}

.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__choice__remove:hover {
color: #333;
color: var(--body-fg);
}

.select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-search--inline {
Expand All @@ -163,12 +167,12 @@ select.admin-autocomplete {
}

.select2-container--admin-autocomplete.select2-container--focus .select2-selection--multiple {
border: solid #999 1px;
border: solid var(--body-quiet-color) 1px;
outline: 0;
}

.select2-container--admin-autocomplete.select2-container--disabled .select2-selection--multiple {
background-color: #eee;
background-color: var(--darkened-bg);
cursor: default;
}

Expand All @@ -186,12 +190,20 @@ select.admin-autocomplete {
border-bottom-right-radius: 0;
}

.select2-container--admin-autocomplete .select2-search--dropdown {
background: var(--darkened-bg);
}

.select2-container--admin-autocomplete .select2-search--dropdown .select2-search__field {
border: 1px solid #ccc;
background: var(--body-bg);
color: var(--body-fg);
border: 1px solid var(--border-color);
border-radius: 4px;
}

.select2-container--admin-autocomplete .select2-search--inline .select2-search__field {
background: transparent;
color: var(--body-fg);
border: none;
outline: 0;
box-shadow: none;
Expand All @@ -201,18 +213,21 @@ select.admin-autocomplete {
.select2-container--admin-autocomplete .select2-results > .select2-results__options {
max-height: 200px;
overflow-y: auto;
color: var(--body-fg);
background: var(--body-bg);
}

.select2-container--admin-autocomplete .select2-results__option[role=group] {
padding: 0;
}

.select2-container--admin-autocomplete .select2-results__option[aria-disabled=true] {
color: #999;
color: var(--body-quiet-color);
}

.select2-container--admin-autocomplete .select2-results__option[aria-selected=true] {
background-color: #ddd;
background-color: var(--selected-bg);
color: var(--body-fg);
}

.select2-container--admin-autocomplete .select2-results__option .select2-results__option {
Expand Down Expand Up @@ -249,8 +264,8 @@ select.admin-autocomplete {
}

.select2-container--admin-autocomplete .select2-results__option--highlighted[aria-selected] {
background-color: #79aec8;
color: white;
background-color: var(--primary);
color: var(--primary-fg);
}

.select2-container--admin-autocomplete .select2-results__group {
Expand Down
Loading