##// END OF EJS Templates
dockerizando ...
Fiorella Quino -
r289:80ef760f4249
parent child
Show More
@@ -1,33 +1,35
1 FROM bitnami/minideb:jessie
1 FROM python:2.7.11
2 2
3 3 # setup libraries
4 RUN install_packages python \
5 python-pip \
6 python-dev \
7 gfortran \
8 libpng-dev \
9 freetype* \
10 libblas-dev \
11 liblapack-dev \
12 libmysqlclient-dev \
13 libatlas-base-dev
4 #RUN apt-get install python \
5 #python-pip \
6 #python-dev \
7 #gfortran \
8 #libpng-dev \
9 #freetype* \
10 #libblas-dev \
11 #liblapack-dev \
12 #libmysqlclient-dev \
13 #libatlas-base-dev
14
14 15
15 16 # set working directory
16 17 RUN mkdir /radarsys
17 18 WORKDIR /radarsys
18 19
19 20 # Copy the main application.
20 21 COPY . ./
21 22
22 23 # Install python dependences
23 24 RUN pip install -v --timeout 120 -r requirements.txt
24 25
25 RUN python manage.py makemigrations \
26 && python manage.py migrate \
27 && python manage.py loaddata apps/main/fixtures/main_initial_data.json \
28 && python manage.py loaddata apps/rc/fixtures/rc_initial_data.json \
29 && python manage.py loaddata apps/jars/fixtures/jars_initial_data.json
26 #(Solo si mysql existe)
27 #RUN python manage.py makemigrations \
28 # && python manage.py migrate \
29 # && python manage.py loaddata apps/main/fixtures/main_initial_data.json \
30 # && python manage.py loaddata apps/rc/fixtures/rc_initial_data.json \
31 # && python manage.py loaddata apps/jars/fixtures/jars_initial_data.json
30 32
31 33 EXPOSE 3000
32 34 CMD ["python", "manage.py", "runserver", "0.0.0.0:3000"]
33 35
@@ -1,148 +1,149
1 1 """
2 2 Django settings for radarsys project.
3 3
4 4 Generated by 'django-admin startproject' using Django 1.8.6.
5 5
6 6 For more information on this file, see
7 7 https://docs.djangoproject.com/en/1.8/topics/settings/
8 8
9 9 For the full list of settings and their values, see
10 10 https://docs.djangoproject.com/en/1.8/ref/settings/
11 11 """
12 12
13 13 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
14 14 import os
15 15
16 16 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
17 17
18 18 # Quick-start development settings - unsuitable for production
19 19 # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
20 20
21 21 # SECURITY WARNING: keep the secret key used in production secret!
22 22 SECRET_KEY = 'xshb$k5fc-+j16)cvyffj&9u__0q3$l!hieh#+tbzqg)*f^km0'
23 23
24 24 # SECURITY WARNING: don't run with debug turned on in production!
25 25 DEBUG = True
26 26
27 27 ALLOWED_HOSTS = ['*']
28 28
29 29 # Application definition
30 30
31 31 INSTALLED_APPS = (
32 32 'django.contrib.admin',
33 33 'django.contrib.auth',
34 34 'django.contrib.contenttypes',
35 35 'django.contrib.sessions',
36 36 'django.contrib.messages',
37 37 'django.contrib.staticfiles',
38 38 'bootstrap3',
39 39 'polymorphic',
40 40 'apps.accounts',
41 41 'apps.main',
42 42 'apps.misc',
43 43 'apps.rc',
44 44 'apps.dds',
45 45 'apps.jars',
46 46 'apps.usrp',
47 47 'apps.abs',
48 48 'apps.cgs',
49 49 )
50 50
51 51 MIDDLEWARE_CLASSES = (
52 52 'django.contrib.sessions.middleware.SessionMiddleware',
53 53 'django.middleware.common.CommonMiddleware',
54 54 'django.middleware.csrf.CsrfViewMiddleware',
55 55 'django.contrib.auth.middleware.AuthenticationMiddleware',
56 56 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
57 57 'django.contrib.messages.middleware.MessageMiddleware',
58 58 'django.middleware.clickjacking.XFrameOptionsMiddleware',
59 59 'django.middleware.security.SecurityMiddleware',
60 60 )
61 61
62 62 ROOT_URLCONF = 'radarsys.urls'
63 63
64 64 TEMPLATES = [
65 65 {
66 66 'BACKEND': 'django.template.backends.django.DjangoTemplates',
67 67 'DIRS': [os.path.join(BASE_DIR, "templates").replace('\\', '/'),],
68 68 'APP_DIRS': True,
69 69 'OPTIONS': {
70 70 'context_processors': [
71 71 'django.template.context_processors.debug',
72 72 'django.template.context_processors.request',
73 73 'django.contrib.auth.context_processors.auth',
74 74 'django.contrib.messages.context_processors.messages',
75 75 ],
76 76 },
77 77 },
78 78 ]
79 79
80 80 WSGI_APPLICATION = 'radarsys.wsgi.application'
81 81
82 82
83 83 # Database
84 84 # https://docs.djangoproject.com/en/1.8/ref/settings/#databases
85 85
86 86 DATABASES = {
87 87 'default': {
88 88 #'ENGINE': 'django.db.backends.sqlite3',
89 89 #'NAME': os.path.join(BASE_DIR, 'radarsys.sqlite'),
90 90 'ENGINE': 'django.db.backends.mysql',
91 91 'NAME': 'radarsys',
92 92 'USER': 'developer',
93 #'HOST': 'mysql-radarsys-server',
93 94 'PASSWORD': 'idi2015',
94 95 'OPTIONS': {
95 96 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
96 97 }
97 98 }
98 99 }
99 100
100 101
101 102 # Internationalization
102 103 # https://docs.djangoproject.com/en/1.8/topics/i18n/
103 104
104 105 LANGUAGE_CODE = 'en-us'
105 106
106 107 TIME_ZONE = None
107 108
108 109 USE_I18N = True
109 110
110 111 USE_L10N = True
111 112
112 113 USE_TZ = False
113 114
114 115 # Static files (CSS, JavaScript, Images)
115 116 # https://docs.djangoproject.com/en/1.8/howto/static-files/
116 117
117 118 MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
118 119 MEDIA_URL = '/site_media/'
119 120
120 121 STATIC_URL = '/static/'
121 122 #STATIC_ROOT = '/var/www/html/static/'
122 123 STATIC_ROOT = os.path.join(MEDIA_ROOT, 'static')
123 124
124 125 #STATICFILES_DIRS = (
125 126 # os.path.join(BASE_DIR, 'apps', 'main', 'static'),
126 127 #
127 128 #)
128 129
129 130
130 131 STATICFILES_FINDERS = (
131 132 'django.contrib.staticfiles.finders.FileSystemFinder',
132 133 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
133 134 )
134 135
135 136 FIXTURE_DIRS = (
136 137 os.path.join(BASE_DIR, 'apps', 'rc', 'fixtures'),
137 138 os.path.join(BASE_DIR, 'apps', 'main', 'fixtures'),
138 139 os.path.join(BASE_DIR, 'apps', 'jars', 'fixtures'),
139 140 )
140 141
141 142 # Celery stuff
142 143
143 144 BROKER_URL = 'redis://localhost:6379'
144 145 CELERY_RESULT_BACKEND = 'redis://localhost:6379'
145 146 CELERY_ACCEPT_CONTENT = ['application/json']
146 147 CELERY_TASK_SERIALIZER = 'json'
147 148 CELERY_RESULT_SERIALIZER = 'json'
148 149 CELERY_TIMEZONE = 'America/Lima'
General Comments 0
You need to be logged in to leave comments. Login now