Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
library-app-django
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ilham Maulana
library-app-django
Commits
e9b27947
Commit
e9b27947
authored
Aug 09, 2024
by
Ilham Maulana
💻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: setting database
parent
139453fc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
.env.dev
.env.dev
+3
-0
Dockerfile
Dockerfile
+13
-0
settings.py
config/settings.py
+4
-4
No files found.
.env.dev
0 → 100644
View file @
e9b27947
DEBUG=1
SECRET_KEY=foo
DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
\ No newline at end of file
Dockerfile
0 → 100644
View file @
e9b27947
FROM
python:3.12.0
WORKDIR
/library_app
COPY
requirements.txt .
RUN
pip
install
--no-cache-dir
-r
requirements.txt
COPY
. .
EXPOSE
8000
CMD
["python", "manage.py", "runserver", "0.0.0.0:8000"]
\ No newline at end of file
config/settings.py
View file @
e9b27947
...
...
@@ -11,7 +11,7 @@ https://docs.djangoproject.com/en/5.0/ref/settings/
"""
from
pathlib
import
Path
from
.
settings
import
DATABASES
,
LIST_HOST
from
.
constants
import
DATABASES
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR
=
Path
(
__file__
)
.
resolve
()
.
parent
.
parent
...
...
@@ -21,12 +21,12 @@ BASE_DIR = Path(__file__).resolve().parent.parent
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY
=
"
django-insecure-hkn&ykayorr75b$9*h^u&$@j(yl^
%
odsww0t&x
%
esl)le$t2$e
"
SECRET_KEY
=
"
PkJtZr9Ctg7/Rg2PraJTxlW3w0szR8pi0UKylLc/5+lGGt+Z8zIctlRrRcgcC40ajeBLHp9227fMHAFx8b6Rsg==
"
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG
=
Tru
e
DEBUG
=
Fals
e
ALLOWED_HOSTS
=
LIST_HOST
ALLOWED_HOSTS
=
[
"localhost"
,
"127.0.0.1"
]
# Application definition
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment