Merge pull request #7 from mtyton/feature/production_preparation

Feature/production preparation
pull/2/head
mtyton 2023-05-16 20:05:42 +02:00 zatwierdzone przez GitHub
commit 69581ce53d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 32 dodań i 13 usunięć

Wyświetl plik

@ -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")
) )
} }

Wyświetl plik

@ -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"
]

Wyświetl plik

@ -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

Wyświetl plik

@ -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