From c86f626b57a272ee8350cf2a80ab63c82991a934 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 4 Apr 2017 19:22:00 +0200 Subject: [PATCH] Update theme config, Fix gulp installer version --- app/Dockerfile => Dockerfile | 10 +++++----- app/Gemfile => Gemfile | 0 app/bin/app.sh | 1 + app/bin/init.sh | 3 +-- app/local_settings.py | 8 +++----- app/settings.py | 14 +++++++------- bin/build_front.sh | 2 +- docker-compose.yml | 2 +- app/package.json => package.json | 6 +++--- requirements.txt => requirements-debian.txt | 0 app/requirements.txt => requirements-python.txt | 1 + 11 files changed, 23 insertions(+), 24 deletions(-) rename app/Dockerfile => Dockerfile (69%) rename app/Gemfile => Gemfile (100%) rename app/package.json => package.json (91%) rename requirements.txt => requirements-debian.txt (100%) rename app/requirements.txt => requirements-python.txt (97%) diff --git a/app/Dockerfile b/Dockerfile similarity index 69% rename from app/Dockerfile rename to Dockerfile index 5e7b7f65..6533730d 100644 --- a/app/Dockerfile +++ b/Dockerfile @@ -7,10 +7,10 @@ RUN mkdir /srv/lib WORKDIR /srv RUN apt-get update && apt-get install -y apt-transport-https -COPY ../etc/apt/sources.list /etc/apt/ -COPY ../requirements.txt /srv +COPY etc/apt/sources.list /etc/apt/ +COPY requirements-debian.txt /srv RUN apt-get update && \ - DEBIAN_PACKAGES=$(egrep -v "^\s*(#|$)" /srv/requirements.txt) && \ + DEBIAN_PACKAGES=$(egrep -v "^\s*(#|$)" /srv/requirements-debian.txt) && \ apt-get install -y --force-yes $DEBIAN_PACKAGES && \ echo fr_FR.UTF-8 UTF-8 >> /etc/locale.gen && \ locale-gen && \ @@ -29,7 +29,7 @@ COPY Gemfile /srv RUN gem install bundler RUN bundle install -COPY requirements.txt /srv -RUN pip install -r requirements.txt --src /srv/lib +COPY requirements-python.txt /srv +RUN pip install -r requirements-python.txt --src /srv/lib WORKDIR /srv/app diff --git a/app/Gemfile b/Gemfile similarity index 100% rename from app/Gemfile rename to Gemfile diff --git a/app/bin/app.sh b/app/bin/app.sh index 475bba6d..2794571a 100755 --- a/app/bin/app.sh +++ b/app/bin/app.sh @@ -26,6 +26,7 @@ gid='www-data' # pip install django-querysetsequence==0.6.1 django==1.9.11 # pip install django-autocomplete-light django-querysetsequence # /usr/bin/yes | pip uninstall django-orderable +# pip install bleach==1.5.0 django==1.9.11 chown -R $uid:$gid $media diff --git a/app/bin/init.sh b/app/bin/init.sh index 9a27441d..b513d9ad 100755 --- a/app/bin/init.sh +++ b/app/bin/init.sh @@ -7,11 +7,10 @@ manage=$app'/manage.py' python $manage migrate --noinput python $manage create-admin-user python $manage create-default-organization +python $manage build_themes # @todo searching every fixtures file in each folder python $manage loaddata $app/organization/job/fixtures/organization-job.json python $manage loaddata $app/organization/projects/fixtures/organization-projects-repositorysystems.json bash /srv/doc/build.sh - -cd /srv && bower --allow-root install && gulp build diff --git a/app/local_settings.py b/app/local_settings.py index 6119212d..620762fe 100644 --- a/app/local_settings.py +++ b/app/local_settings.py @@ -52,8 +52,6 @@ EVENT_CONFIRMATION_URL = EVENT_DOMAIN+"/pub.php/cart/done?transaction_id=%s" FIGGO_API_URL_PROD='https://ircam.ilucca.net/' FIGGO_API_HEADER_AUTH='Lucca application=bd6d5481-40eb-414b-9135-434e12749223' -HOST_THEMES = [ - #('www.starts.eu', 'themes.starts_eu'), - #('vertigo.starts.eu', 'themes.vertigo_starts_eu'), - ('manifeste.ircam.fr', 'themes.base'), -] +# HOST_THEMES = [ +# ('manifeste.ircam.fr', 'themes.base'), +# ] diff --git a/app/settings.py b/app/settings.py index 7f31d287..ad4165f1 100644 --- a/app/settings.py +++ b/app/settings.py @@ -214,14 +214,13 @@ ROOT_URLCONF = "urls" ################ INSTALLED_APPS = [ - "themes.base", - # "themes.starts_eu", - # 'themes.vertigo_starts_eu', + "organization_themes.www_ircam_fr", "modeltranslation", "dal", "dal_select2", "dal_queryset_sequence", + "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", @@ -229,19 +228,20 @@ INSTALLED_APPS = [ "django.contrib.sessions", "django.contrib.sites", "django.contrib.staticfiles", + "django.contrib.sitemaps", 'django_extensions', + "mezzanine.boot", "mezzanine.conf", - "django.contrib.sitemaps", "mezzanine.core", "mezzanine.generic", "mezzanine.pages", "mezzanine.blog", "mezzanine.forms", - # "mezzanine.galleries", - # "mezzanine.mobile", "mezzanine.twitter", "mezzanine.accounts", + # "mezzanine.galleries", + # "mezzanine.mobile", "cartridge.shop", 'djangobower', "meta", @@ -307,7 +307,7 @@ if not DEBUG: TEMPLATES[0]['APP_DIRS'] = False HOST_THEMES = [ - ('example.com', 'themes.base'), + ('example.com', 'organization_themes.www_ircam_fr'), ] # List of middleware classes to use. Order is important; in the request phase, diff --git a/bin/build_front.sh b/bin/build_front.sh index 6cf2d1af..37cae070 100755 --- a/bin/build_front.sh +++ b/bin/build_front.sh @@ -1,4 +1,4 @@ #!/bin/sh -docker-compose run app bash -c "cd /srv && bower --allow-root install && gulp build" +docker-compose run app python /srv/app/manage.py build_themes --no-input docker-compose run app python /srv/app/manage.py collectstatic --no-input diff --git a/docker-compose.yml b/docker-compose.yml index e63143f5..36a2ccdc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,7 +42,7 @@ db: - POSTGRES_PASSWORD=noodFof2Kna app: - build: app + build: . command: /bin/bash bin/app.sh volumes: - ./app:/srv/app diff --git a/app/package.json b/package.json similarity index 91% rename from app/package.json rename to package.json index cd0b125a..ab4485ce 100644 --- a/app/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "mezz-o", - "description": "mezz-o", - "version": "1.0", + "name": "mezzo", + "description": "mezzo", + "version": "1.0.0", "author": { "name": "Bunker Palace", "email": "devs@bunkerpalace.com" diff --git a/requirements.txt b/requirements-debian.txt similarity index 100% rename from requirements.txt rename to requirements-debian.txt diff --git a/app/requirements.txt b/requirements-python.txt similarity index 97% rename from app/requirements.txt rename to requirements-python.txt index 05f8196c..1143dacd 100644 --- a/app/requirements.txt +++ b/requirements-python.txt @@ -3,6 +3,7 @@ uwsgi watchdog mysqlclient psycopg2 +django==1.9.11 -e git+https://github.com/yomguy/mezzanine.git@jquery#egg=mezzanine-4.2-dev -e git+https://github.com/yomguy/grappelli-safe.git@dynamic_stacked#egg=grappelli-safe-0.4.2 -- 2.39.5