@@ -4,14 +4,21 FROM python:2.7.11 | |||
|
4 | 4 | RUN mkdir /radarsys |
|
5 | 5 | WORKDIR /radarsys |
|
6 | 6 | |
|
7 | # Copy the main application. | |
|
8 | COPY . ./ | |
|
9 | ||
|
10 | 7 | # Install python dependences |
|
8 | ADD requirements.txt ./requirements.txt | |
|
11 | 9 | RUN pip install -v --timeout 120 -r requirements.txt --no-cache-dir |
|
12 | 10 | |
|
13 | EXPOSE 3000 | |
|
11 | # Copy the main application. | |
|
12 | COPY . ./ | |
|
13 | #RUN mkdir /radarsys media | |
|
14 | # RUN python manage.py makemigrations \ | |
|
15 | # && python manage.py migrate \ | |
|
16 | # && python manage.py loaddata apps/main/fixtures/main_initial_data.json \ | |
|
17 | # && python manage.py loaddata apps/rc/fixtures/rc_initial_data.json \ | |
|
18 | # && python manage.py loaddata apps/jars/fixtures/initial_filters_data.json \ | |
|
19 | RUN python manage.py collectstatic --noinput | |
|
20 | #EXPOSE 3000 | |
|
14 | 21 | # CMD ["python", "manage.py", "runserver", "0.0.0.0:3000"] |
|
15 | 22 | # Para produccion: |
|
16 | CMD ["gunicorn", "radarsys.wsgi:application", "--bind", "0.0.0.0:3000"] | |
|
23 | #CMD ["gunicorn", "radarsys.wsgi:application", "--bind", "0.0.0.0:3000"] | |
|
17 | 24 |
@@ -90,7 +90,7 DATABASES = { | |||
|
90 | 90 | 'ENGINE': 'django.db.backends.mysql', |
|
91 | 91 | 'NAME': 'radarsys', |
|
92 | 92 | 'USER': 'developer', |
|
93 |
#'HOST': 'mysql |
|
|
93 | #'HOST': 'mysql', | |
|
94 | 94 | 'PASSWORD': 'idi2015', |
|
95 | 95 | 'OPTIONS': { |
|
96 | 96 | 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'", |
@@ -140,9 +140,16 FIXTURE_DIRS = ( | |||
|
140 | 140 | ) |
|
141 | 141 | |
|
142 | 142 | # Celery stuff |
|
143 | ||
|
144 | BROKER_URL = 'redis://localhost:6379' | |
|
145 | CELERY_RESULT_BACKEND = 'redis://localhost:6379' | |
|
143 | REDIS_HOST = 'redis' | |
|
144 | BROKER_TRANSPORT = 'redis' | |
|
145 | #--Development--# (Para Pruebas Locales) | |
|
146 | BROKER_URL = 'redis://127.0.0.1:6300' | |
|
147 | CELERY_RESULT_BACKEND = 'redis://localhost:6300' | |
|
148 | #---------------# | |
|
149 | #--Production---# (Para Docker) | |
|
150 | #CELERY_BROKER_TRANSPORT = BROKER_URL = 'redis://%s:6379/0' % REDIS_HOST | |
|
151 | #CELERY_RESULT_BACKEND = 'redis://%s:6379/0' % REDIS_HOST | |
|
152 | #---------------# | |
|
146 | 153 | CELERY_ACCEPT_CONTENT = ['application/json'] |
|
147 | 154 | CELERY_TASK_SERIALIZER = 'json' |
|
148 | 155 | CELERY_RESULT_SERIALIZER = 'json' |
@@ -15,7 +15,7 Including another URLconf | |||
|
15 | 15 | """ |
|
16 | 16 | from django.conf.urls import include, url |
|
17 | 17 | from django.contrib import admin |
|
18 | from django.contrib.staticfiles.urls import staticfiles_urlpatterns | |
|
18 | #from django.contrib.staticfiles.urls import staticfiles_urlpatterns | |
|
19 | 19 | |
|
20 | 20 | urlpatterns = [ |
|
21 | 21 | url(r'^admin/', include(admin.site.urls)), |
@@ -30,4 +30,4 urlpatterns = [ | |||
|
30 | 30 | url(r'^misc/', include('apps.misc.urls')), |
|
31 | 31 | ] |
|
32 | 32 | |
|
33 | urlpatterns += staticfiles_urlpatterns() | |
|
33 | #urlpatterns += staticfiles_urlpatterns() |
@@ -31,6 +31,9 docker run -d --name radarsys01 --link mysql-radarsys-server -p 3000:3000 \ | |||
|
31 | 31 | MEDIA_ROOT: 'media' |
|
32 | 32 | ### En el script abs/utils/Graphics_OverJro.py, matplotlib Agg debe estar habilitado |
|
33 | 33 | matplotlib.use("Agg") |
|
34 | ### En el script radarsys/urls.py comentar para que nginx sirva "static": | |
|
35 | #from django.contrib.staticfiles.urls import staticfiles_urlpatterns | |
|
36 | #urlpatterns += staticfiles_urlpatterns() | |
|
34 | 37 | |
|
35 | 38 | ### Ejecutar los siguientes comandos (solo si ya se creo mysql-radarsys-server): |
|
36 | 39 | python manage.py makemigrations \ |
General Comments 0
You need to be logged in to leave comments.
Login now