made server ready for production
This commit is contained in:
parent
c9e97da9e9
commit
ee55b7ae44
3 changed files with 8 additions and 4 deletions
|
|
@ -8,10 +8,10 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./markdownblog:/markdownblog
|
- ./markdownblog:/markdownblog
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8234:8234"
|
||||||
env_file:
|
env_file:
|
||||||
- envvars.env
|
- envvars.env
|
||||||
command: python3 manage.py runserver 0.0.0.0:8000
|
command: gunicorn markdownblog.wsgi -b 0.0.0.0:8234
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -20,4 +20,4 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
env_file:
|
env_file:
|
||||||
- envvars.env
|
- envvars.env
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@ USE_TZ = True
|
||||||
# https://docs.djangoproject.com/en/4.0/howto/static-files/
|
# https://docs.djangoproject.com/en/4.0/howto/static-files/
|
||||||
|
|
||||||
STATIC_URL = 'static/'
|
STATIC_URL = 'static/'
|
||||||
|
STATIC_ROOT = '/markdownblog/static'
|
||||||
|
|
||||||
# Default primary key field type
|
# Default primary key field type
|
||||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
|
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
|
||||||
|
|
@ -132,3 +133,5 @@ LOGIN_REDIRECT_URL = "/"
|
||||||
LOGOUT_REDIRECT_URL = "/"
|
LOGOUT_REDIRECT_URL = "/"
|
||||||
|
|
||||||
CSRF_HEADER_NAME = "X-CSRFToken"
|
CSRF_HEADER_NAME = "X-CSRFToken"
|
||||||
|
|
||||||
|
CSRF_TRUSTED_ORIGINS = ["https://cdaut.de", "http://cdaut.de"]
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,5 @@ psycopg2-binary==2.9.3
|
||||||
factory-boy==3.2.1
|
factory-boy==3.2.1
|
||||||
markdown2==2.4.3
|
markdown2==2.4.3
|
||||||
fontawesomefree==6.1.1
|
fontawesomefree==6.1.1
|
||||||
pygments==2.12.0
|
pygments==2.12.0
|
||||||
|
gunicorn==20.1.0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue