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 = {
|
DATABASES = {
|
||||||
"default": db_url.parse(
|
"default": db_url.parse(
|
||||||
"postgres://comfy:password@db/comfy_shop"
|
os.environ.get("DATABASE_URL")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,10 @@ from .base import *
|
||||||
|
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
|
|
||||||
try:
|
SECRET_KEY = os.environ.get("SECRET_KEY")
|
||||||
from .local import *
|
ALLOWED_HOSTS = [
|
||||||
except ImportError:
|
"91.195.93.3",
|
||||||
pass
|
"localhost",
|
||||||
|
"0.0.0.0",
|
||||||
|
"127.0.0.1"
|
||||||
|
]
|
||||||
|
|
|
@ -8,13 +8,22 @@ services:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/app
|
- ./:/app
|
||||||
|
environment:
|
||||||
|
- SECRET_KEY
|
||||||
|
- DATABASE_URL
|
||||||
|
- DJANGO_SETTINGS_MODULE
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres
|
image: postgres
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_ROOT_PASSWORD: password
|
- POSTGRES_ROOT_PASSWORD
|
||||||
POSTGRES_USER: comfy
|
- POSTGRES_USER
|
||||||
POSTGRES_PASSWORD: password
|
- POSTGRES_PASSWORD
|
||||||
POSTGRES_DB: comfy_shop
|
- POSTGRES_DB
|
||||||
volumes:
|
volumes:
|
||||||
- ../postgres/:/var/lib/postgresql
|
- ../postgres/:/var/lib/postgresql
|
||||||
|
env_file:
|
||||||
|
- .env
|
|
@ -8,13 +8,20 @@ services:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/app
|
- ./:/app
|
||||||
|
environment:
|
||||||
|
- SECRET_KEY
|
||||||
|
- DATABASE_URL
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
db:
|
db:
|
||||||
image: postgres
|
image: postgres
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_ROOT_PASSWORD: password
|
- POSTGRES_ROOT_PASSWORD
|
||||||
POSTGRES_USER: comfy
|
- POSTGRES_USER
|
||||||
POSTGRES_PASSWORD: password
|
- POSTGRES_PASSWORD
|
||||||
POSTGRES_DB: comfy_shop
|
- POSTGRES_DB
|
||||||
volumes:
|
volumes:
|
||||||
- ../postgres/:/var/lib/postgresql
|
- ../postgres/:/var/lib/postgresql
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
|
Ładowanie…
Reference in New Issue