Docker Ok. Testing CI/CD should work
This commit is contained in:
parent
74d9c6102a
commit
c17a6fb209
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -175,3 +175,4 @@ cython_debug/
|
||||||
#.idea/
|
#.idea/
|
||||||
# Avoiding public key leakage
|
# Avoiding public key leakage
|
||||||
/config.py
|
/config.py
|
||||||
|
/env.prod.db
|
|
@ -2,4 +2,8 @@ SECRET_KEY = 'xinxl8xx#j$)#5h#pbv3knyyq2d6o%j125rx==e7vz*#wsd32w'
|
||||||
|
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
ALLOWED_HOSTS = []
|
ALLOWED_HOSTS = []
|
||||||
|
|
||||||
|
DBUSER = "tldtest"
|
||||||
|
|
||||||
|
DBPASSWORD = "clubmate2010"
|
||||||
|
|
|
@ -14,5 +14,7 @@ services:
|
||||||
image: postgres:15
|
image: postgres:15
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data/
|
- postgres_data:/var/lib/postgresql/data/
|
||||||
|
env_file:
|
||||||
|
- env.prod.db
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
|
|
3
env.prod.db.example
Normal file
3
env.prod.db.example
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
POSTGRES_USER=tldtest
|
||||||
|
POSTGRES_PASSWORD="clubmate2010"
|
||||||
|
POSTGRES_DB=tldtest-db
|
|
@ -1,5 +1,5 @@
|
||||||
asgiref==3.7.2
|
asgiref==3.7.2
|
||||||
build==1.1.1
|
build==1.0.3
|
||||||
click==8.1.7
|
click==8.1.7
|
||||||
Django==5.0.2
|
Django==5.0.2
|
||||||
django-admin-extra-buttons==1.5.7
|
django-admin-extra-buttons==1.5.7
|
||||||
|
@ -9,7 +9,8 @@ flake8==7.0.0
|
||||||
gunicorn==21.2.0
|
gunicorn==21.2.0
|
||||||
mccabe==0.7.0
|
mccabe==0.7.0
|
||||||
packaging==23.2
|
packaging==23.2
|
||||||
pip-tools==7.4.0
|
pip-tools==7.3.0
|
||||||
|
psycopg2-binary==2.9.9
|
||||||
pycodestyle==2.11.1
|
pycodestyle==2.11.1
|
||||||
pyflakes==3.2.0
|
pyflakes==3.2.0
|
||||||
pyproject_hooks==1.0.0
|
pyproject_hooks==1.0.0
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# This file is autogenerated by pip-compile with Python 3.12
|
# This file is autogenerated by pip-compile with Python 3.11
|
||||||
# by the following command:
|
# by the following command:
|
||||||
#
|
#
|
||||||
# pip-compile --output-file=requirements.txt requirements.in
|
# pip-compile --output-file=requirements.txt requirements.in
|
||||||
|
@ -8,7 +8,7 @@ asgiref==3.7.2
|
||||||
# via
|
# via
|
||||||
# -r requirements.in
|
# -r requirements.in
|
||||||
# django
|
# django
|
||||||
build==1.1.1
|
build==1.0.3
|
||||||
# via
|
# via
|
||||||
# -r requirements.in
|
# -r requirements.in
|
||||||
# pip-tools
|
# pip-tools
|
||||||
|
@ -40,7 +40,10 @@ packaging==23.2
|
||||||
# via
|
# via
|
||||||
# -r requirements.in
|
# -r requirements.in
|
||||||
# build
|
# build
|
||||||
pip-tools==7.4.0
|
# gunicorn
|
||||||
|
pip-tools==7.3.0
|
||||||
|
# via -r requirements.in
|
||||||
|
psycopg2-binary==2.9.9
|
||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
pycodestyle==2.11.1
|
pycodestyle==2.11.1
|
||||||
# via
|
# via
|
||||||
|
@ -54,7 +57,6 @@ pyproject-hooks==1.0.0
|
||||||
# via
|
# via
|
||||||
# -r requirements.in
|
# -r requirements.in
|
||||||
# build
|
# build
|
||||||
# pip-tools
|
|
||||||
rcssmin==1.1.1
|
rcssmin==1.1.1
|
||||||
# via
|
# via
|
||||||
# -r requirements.in
|
# -r requirements.in
|
||||||
|
|
|
@ -21,7 +21,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
|
||||||
|
|
||||||
# SECURITY WARNING: keep the secret key used in production secret!
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
SCRET_KEY = config.SECRET_KEY
|
SECRET_KEY = config.SECRET_KEY
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = config.DEBUG
|
DEBUG = config.DEBUG
|
||||||
|
@ -78,12 +78,25 @@ WSGI_APPLICATION = 'tldtest.wsgi.application'
|
||||||
# Database
|
# Database
|
||||||
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
|
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
|
||||||
|
|
||||||
DATABASES = {
|
if DEBUG is True:
|
||||||
'default': {
|
DATABASES = {
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
'default': {
|
||||||
'NAME': BASE_DIR / 'db.sqlite3',
|
'ENGINE': 'django.db.backends.sqlite3',
|
||||||
|
'NAME': BASE_DIR / 'db.sqlite3',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else:
|
||||||
|
DATABASES = {
|
||||||
|
"default": {
|
||||||
|
"ENGINE": ("django.db.backends.postgresql"),
|
||||||
|
"NAME": ("tldtest-db"),
|
||||||
|
"USER": (config.DBUSER),
|
||||||
|
"PASSWORD": (config.DBPASSWORD),
|
||||||
|
"HOST": ("db"),
|
||||||
|
"PORT": ("5432"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Password validation
|
# Password validation
|
||||||
|
|
Loading…
Reference in a new issue