Skip to content
Snippets Groups Projects
Commit 1aefb29b authored by florimondmanca's avatar florimondmanca
Browse files

forgotten from previous commit

parent a7f1036a
No related branches found
No related tags found
1 merge request!1Dockerize app and update TravisCI file
# Repository files
.git
.gitignore
.idea
.travis.yml
media/
README.md
LICENSE
# Databases
**/*.sqlite
......
......@@ -6,6 +6,8 @@ services:
gunicorn:
build: .
container_name: django_01
volumes:
- .:/oser-backend/
expose:
- "8000" # port where the Django app runs
restart: on-failure
......
......@@ -5,7 +5,7 @@ upstream gunicorn {
}
server {
server_name localhost;
server_name web;
listen 8000;
location /static/ {
# Serve static files collected by Django's collectstatic command
......
......@@ -18,7 +18,7 @@ BASE_DIR = dn(dn(dn(os.path.abspath(__file__))))
# One way to do this is to store it in an environment variable on the server
SECRET_KEY = 'i^08u==e5++$g(9a#^b46i@xsstxnf9j2rn(%g5nbe@#xu*5#c'
DEBUG = False
ALLOWED_HOSTS = ['localhost', 'gunicorn']
ALLOWED_HOSTS = ['localhost']
ADMINS = (
('admin', 'admin@oser-cs.fr'),
......
......@@ -2,4 +2,4 @@ import os
from .default import *
DEBUG = False
ALLOWED_HOSTS = ['oser-cs.fr', 'florimondmanca.pythonanywhere.com']
ALLOWED_HOSTS = ['florimondmanca.pythonanywhere.com', 'localhost']
......@@ -11,6 +11,7 @@ import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "oser_backend.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE",
"oser_backend.settings.production")
application = get_wsgi_application()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment