production ready

pull/6/head
root 2024-08-05 13:01:21 +02:00
parent 2c286dacf4
commit 2e1fd94c8f
2 changed files with 3 additions and 2 deletions

View File

@ -31,7 +31,7 @@ SECRET_KEY = os.getenv('SECRET_KEY')
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False DEBUG = False
ALLOWED_HOSTS = ['localhost', '127.0.0.1'] ALLOWED_HOSTS = ['localhost', '127.0.0.1', 'beyond-heroes.com', 'www.beyond-heroes.com']
# Application definition # Application definition

View File

@ -7,8 +7,9 @@ services:
- .:/app - .:/app
ports: ports:
- "3030:3030" - "3030:3030"
network_mode: "host"
command: > command: >
sh -c "python manage.py makemigrations blog --noinput && sh -c "python manage.py makemigrations blog --noinput &&
python manage.py migrate --noinput && python manage.py migrate --noinput &&
python manage.py collectstatic --noinput && python manage.py collectstatic --noinput &&
gunicorn BH.wsgi:application --bind 0.0.0.0:3030 --workers ${GUNICORN_WORKERS:-3}" gunicorn BH.wsgi:application --bind 0.0.0.0:3030 --workers ${GUNICORN_WORKERS:-3}"