Merge pull request #7 from mtyton/feature/production_preparation
Feature/production preparationpull/2/head
commit
69581ce53d
|
@ -93,7 +93,7 @@ import dj_database_url as db_url
|
|||
|
||||
DATABASES = {
|
||||
"default": db_url.parse(
|
||||
"postgres://comfy:password@db/comfy_shop"
|
||||
os.environ.get("DATABASE_URL")
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,10 @@ from .base import *
|
|||
|
||||
DEBUG = False
|
||||
|
||||
try:
|
||||
from .local import *
|
||||
except ImportError:
|
||||
pass
|
||||
SECRET_KEY = os.environ.get("SECRET_KEY")
|
||||
ALLOWED_HOSTS = [
|
||||
"91.195.93.3",
|
||||
"localhost",
|
||||
"0.0.0.0",
|
||||
"127.0.0.1"
|
||||
]
|
||||
|
|
|
@ -8,13 +8,22 @@ services:
|
|||
- "8000:8000"
|
||||
volumes:
|
||||
- ./:/app
|
||||
environment:
|
||||
- SECRET_KEY
|
||||
- DATABASE_URL
|
||||
- DJANGO_SETTINGS_MODULE
|
||||
env_file:
|
||||
- .env
|
||||
|
||||
db:
|
||||
image: postgres
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_ROOT_PASSWORD: password
|
||||
POSTGRES_USER: comfy
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: comfy_shop
|
||||
- POSTGRES_ROOT_PASSWORD
|
||||
- POSTGRES_USER
|
||||
- POSTGRES_PASSWORD
|
||||
- POSTGRES_DB
|
||||
volumes:
|
||||
- ../postgres/:/var/lib/postgresql
|
||||
env_file:
|
||||
- .env
|
|
@ -8,13 +8,20 @@ services:
|
|||
- "8000:8000"
|
||||
volumes:
|
||||
- ./:/app
|
||||
environment:
|
||||
- SECRET_KEY
|
||||
- DATABASE_URL
|
||||
env_file:
|
||||
- .env
|
||||
db:
|
||||
image: postgres
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_ROOT_PASSWORD: password
|
||||
POSTGRES_USER: comfy
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: comfy_shop
|
||||
- POSTGRES_ROOT_PASSWORD
|
||||
- POSTGRES_USER
|
||||
- POSTGRES_PASSWORD
|
||||
- POSTGRES_DB
|
||||
volumes:
|
||||
- ../postgres/:/var/lib/postgresql
|
||||
env_file:
|
||||
- .env
|
||||
|
|
Ładowanie…
Reference in New Issue