-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
132 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.venv | ||
.git | ||
.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Pull official base Python Docker image | ||
FROM python:3.10.6 | ||
# Set environment variables | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
ENV PYTHONUNBUFFERED=1 | ||
# Set work directory | ||
WORKDIR /code | ||
# Install dependencies | ||
RUN pip install --upgrade pip | ||
|
||
COPY requirements.txt /code/ | ||
RUN pip install -r requirements.txt | ||
# Copy the Django project | ||
COPY . /code/ |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import dj_database_url | ||
from .base import * | ||
from dotenv import load_dotenv | ||
from datetime import timedelta | ||
from decouple import config | ||
|
||
|
||
load_dotenv() | ||
|
||
|
||
SECRET_KEY="django-insecure-i3518xh534trgj8z%dbs+jnxi)s=y-xe75q7im1iil$3!u0$v^" | ||
DEBUG = True | ||
|
||
os.getenv | ||
# SECURITY WARNING: don't run with debug turned on in production! | ||
|
||
if DEBUG: | ||
import os # only if you haven't already imported this | ||
import socket # only if you haven't already imported this | ||
|
||
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname()) | ||
INTERNAL_IPS = [ip[:-1] + '1' for ip in ips] + ['127.0.0.1', '10.0.2.2'] | ||
|
||
os.getenv('GOOGLE_SERVICE_ACCOUNT') | ||
|
||
DATABASES = { | ||
"default": dj_database_url.config(default=config('DATABASE_URL')) | ||
} | ||
|
||
|
||
SIMPLE_JWT = { | ||
'ACCESS_TOKEN_LIFETIME': timedelta(minutes=60), | ||
'REFRESH_TOKEN_LIFETIME': timedelta(days=1), | ||
'SIGNING_KEY': os.getenv("SECRET_KEY"), | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import dj_database_url | ||
from .base import * | ||
from dotenv import load_dotenv | ||
from datetime import timedelta | ||
from decouple import config | ||
|
||
load_dotenv() | ||
|
||
SECRET_KEY="django-insecure-i3518xh534trgj8z%dbs+jnxi)s=y-xe75q7im1iil$3!u0$v^" | ||
|
||
|
||
DEBUG = False | ||
|
||
|
||
ADMINS = [ | ||
('Olawae Afuye', 'hello@pacific-professional.com.ng'), | ||
] | ||
|
||
|
||
ALLOWED_HOSTS = ["*"] | ||
|
||
|
||
INTERNAL_IPS = ["127.0.0.1", | ||
'chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop'] | ||
|
||
|
||
|
||
|
||
USE_X_FORWARDED_HOST = True | ||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') | ||
CORS_ALLOW_ALL_ORIGINS = True | ||
CORS_ALLOW_ALL_ORIGINS = True | ||
|
||
|
||
|
||
DATABASES = { | ||
"default": { | ||
"ENGINE": "django.db.backends.postgresql", | ||
"NAME": "postgres", | ||
"USER": "postgres", | ||
"PASSWORD": "password", | ||
"HOST": "pg1", # set in docker-compose.yml | ||
"PORT": 5432, # default postgres port | ||
} | ||
} | ||
|
||
|
||
SIMPLE_JWT = { | ||
'ACCESS_TOKEN_LIFETIME': timedelta(minutes=60), | ||
'REFRESH_TOKEN_LIFETIME': timedelta(days=1), | ||
'SIGNING_KEY': os.getenv("SECRET_KEY"), | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters