mirror of
https://github.com/rjNemo/villafleurie
synced 2026-06-12 13:26:47 +00:00
heroku
This commit is contained in:
parent
976227bcc4
commit
692f2a8982
2 changed files with 22 additions and 27 deletions
|
|
@ -1,5 +0,0 @@
|
||||||
build:
|
|
||||||
docker:
|
|
||||||
web: Dockerfile
|
|
||||||
run:
|
|
||||||
web: bash -c "python manage.py makemigrations && python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
|
|
||||||
|
|
@ -78,32 +78,32 @@ WSGI_APPLICATION = 'villafleurie.wsgi.application'
|
||||||
# }
|
# }
|
||||||
# }
|
# }
|
||||||
|
|
||||||
DATABASES = {
|
# DATABASES = {
|
||||||
'default': {
|
# 'default': {
|
||||||
'ENGINE': 'django.db.backends.postgresql',
|
# 'ENGINE': 'django.db.backends.postgresql',
|
||||||
'NAME': 'postgres',
|
# 'NAME': 'postgres',
|
||||||
'USER': 'postgres',
|
# 'USER': 'postgres',
|
||||||
'HOST': 'db',
|
# 'HOST': 'db',
|
||||||
'PORT': '5432',
|
# 'PORT': '5432',
|
||||||
'ATOMIC_REQUESTS': True
|
# 'ATOMIC_REQUESTS': True
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
|
|
||||||
if os.environ.get('ENV') == 'PRODUCTION':
|
if os.environ.get('ENV') == 'PRODUCTION':
|
||||||
# Heroku
|
# Heroku
|
||||||
# db_from_env = dj_database_url.config(conn_max_age=500)
|
db_from_env = dj_database_url.config(conn_max_age=500)
|
||||||
# DATABASES['default'].update(db_from_env)
|
DATABASES['default'].update(db_from_env)
|
||||||
# Docker
|
# Docker
|
||||||
DATABASES = {
|
# DATABASES = {
|
||||||
'default': {
|
# 'default': {
|
||||||
'ENGINE': 'django.db.backends.postgresql',
|
# 'ENGINE': 'django.db.backends.postgresql',
|
||||||
'NAME': 'postgres',
|
# 'NAME': 'postgres',
|
||||||
'USER': 'postgres',
|
# 'USER': 'postgres',
|
||||||
'HOST': 'db',
|
# 'HOST': 'db',
|
||||||
'PORT': '5432',
|
# 'PORT': '5432',
|
||||||
'ATOMIC_REQUESTS': True
|
# 'ATOMIC_REQUESTS': True
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
|
|
||||||
|
|
||||||
AUTH_PASSWORD_VALIDATORS = [
|
AUTH_PASSWORD_VALIDATORS = [
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue