From: Guillaume Pellerin Date: Tue, 4 Apr 2017 17:22:00 +0000 (+0200) Subject: Update theme config, Fix gulp installer version X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=c86f626b57a272ee8350cf2a80ab63c82991a934;p=mezzo.git Update theme config, Fix gulp installer version --- diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..6533730d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,35 @@ +FROM python:3 + +ENV PYTHONUNBUFFERED 1 + +RUN mkdir /srv/app +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-debian.txt /srv +RUN apt-get update && \ + 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 && \ + apt-get clean + +ENV LANG fr_FR.UTF-8 +ENV LANGUAGE fr_FR:fr +ENV LC_ALL fr_FR.UTF-8 + +COPY package.json /srv +RUN npm install +RUN npm install -g gulp +RUN npm install -g bower + +COPY Gemfile /srv +RUN gem install bundler +RUN bundle install + +COPY requirements-python.txt /srv +RUN pip install -r requirements-python.txt --src /srv/lib + +WORKDIR /srv/app diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..039d053a --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source "https://rubygems.org" +ruby "2.1.5" +gem "compass", "<= 1.0.3" +gem "sass", "<= 3.4.22" diff --git a/app/Dockerfile b/app/Dockerfile deleted file mode 100644 index 5e7b7f65..00000000 --- a/app/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -FROM python:3 - -ENV PYTHONUNBUFFERED 1 - -RUN mkdir /srv/app -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 -RUN apt-get update && \ - DEBIAN_PACKAGES=$(egrep -v "^\s*(#|$)" /srv/requirements.txt) && \ - apt-get install -y --force-yes $DEBIAN_PACKAGES && \ - echo fr_FR.UTF-8 UTF-8 >> /etc/locale.gen && \ - locale-gen && \ - apt-get clean - -ENV LANG fr_FR.UTF-8 -ENV LANGUAGE fr_FR:fr -ENV LC_ALL fr_FR.UTF-8 - -COPY package.json /srv -RUN npm install -RUN npm install -g gulp -RUN npm install -g bower - -COPY Gemfile /srv -RUN gem install bundler -RUN bundle install - -COPY requirements.txt /srv -RUN pip install -r requirements.txt --src /srv/lib - -WORKDIR /srv/app diff --git a/app/Gemfile b/app/Gemfile deleted file mode 100644 index 039d053a..00000000 --- a/app/Gemfile +++ /dev/null @@ -1,4 +0,0 @@ -source "https://rubygems.org" -ruby "2.1.5" -gem "compass", "<= 1.0.3" -gem "sass", "<= 3.4.22" 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/package.json b/app/package.json deleted file mode 100644 index cd0b125a..00000000 --- a/app/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "mezz-o", - "description": "mezz-o", - "version": "1.0", - "author": { - "name": "Bunker Palace", - "email": "devs@bunkerpalace.com" - }, - "devDependencies": { - "browser-sync": "^2.11.1", - "gulp": "^3.9.1", - "gulp-autoprefixer": "^3.1.0", - "gulp-bower-files": "^0.2.7", - "gulp-browserify": "^0.5.1", - "gulp-compass": "^2.1.0", - "gulp-concat": "^2.6.0", - "gulp-copy": "0.0.2", - "gulp-cssnano": "^2.1.1", - "gulp-favicons": "^2.2.6", - "gulp-ignore": "^2.0.1", - "gulp-imagemin": "^2.4.0", - "gulp-plumber": "^1.1.0", - "gulp-rename": "^1.2.2", - "gulp-sourcemaps": "^1.6.0", - "gulp-uglify": "^1.5.2", - "gulp-util": "^3.0.7", - "rimraf": "^2.5.2", - "run-sequence": "^1.1.5" - }, - "keywords": [] -} diff --git a/app/requirements.txt b/app/requirements.txt deleted file mode 100644 index 05f8196c..00000000 --- a/app/requirements.txt +++ /dev/null @@ -1,12 +0,0 @@ -setuptools -uwsgi -watchdog -mysqlclient -psycopg2 - --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 --e git+https://github.com/yomguy/cartridge.git#egg=cartridge-0.12-dev --e git+https://github.com/yomguy/mezzanine-agenda.git#egg=mezzanine-agenda-0.2.2 --e git+https://github.com/Ircam-Web/mezzanine-organization.git@split#egg=mezzanine-organization-1.0 --e git+https://github.com/Ircam-Web/mezzanine-organization-themes.git#egg=mezzanine-organization-themes-1.0 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/package.json b/package.json new file mode 100644 index 00000000..ab4485ce --- /dev/null +++ b/package.json @@ -0,0 +1,31 @@ +{ + "name": "mezzo", + "description": "mezzo", + "version": "1.0.0", + "author": { + "name": "Bunker Palace", + "email": "devs@bunkerpalace.com" + }, + "devDependencies": { + "browser-sync": "^2.11.1", + "gulp": "^3.9.1", + "gulp-autoprefixer": "^3.1.0", + "gulp-bower-files": "^0.2.7", + "gulp-browserify": "^0.5.1", + "gulp-compass": "^2.1.0", + "gulp-concat": "^2.6.0", + "gulp-copy": "0.0.2", + "gulp-cssnano": "^2.1.1", + "gulp-favicons": "^2.2.6", + "gulp-ignore": "^2.0.1", + "gulp-imagemin": "^2.4.0", + "gulp-plumber": "^1.1.0", + "gulp-rename": "^1.2.2", + "gulp-sourcemaps": "^1.6.0", + "gulp-uglify": "^1.5.2", + "gulp-util": "^3.0.7", + "rimraf": "^2.5.2", + "run-sequence": "^1.1.5" + }, + "keywords": [] +} diff --git a/requirements-debian.txt b/requirements-debian.txt new file mode 100644 index 00000000..621b42c6 --- /dev/null +++ b/requirements-debian.txt @@ -0,0 +1,13 @@ +git +wget +bzip2 +build-essential +netcat +nodejs +locales +pandoc +vim +python-sphinx +ruby +ruby-dev +gettext diff --git a/requirements-python.txt b/requirements-python.txt new file mode 100644 index 00000000..1143dacd --- /dev/null +++ b/requirements-python.txt @@ -0,0 +1,13 @@ +setuptools +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 +-e git+https://github.com/yomguy/cartridge.git#egg=cartridge-0.12-dev +-e git+https://github.com/yomguy/mezzanine-agenda.git#egg=mezzanine-agenda-0.2.2 +-e git+https://github.com/Ircam-Web/mezzanine-organization.git@split#egg=mezzanine-organization-1.0 +-e git+https://github.com/Ircam-Web/mezzanine-organization-themes.git#egg=mezzanine-organization-themes-1.0 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 621b42c6..00000000 --- a/requirements.txt +++ /dev/null @@ -1,13 +0,0 @@ -git -wget -bzip2 -build-essential -netcat -nodejs -locales -pandoc -vim -python-sphinx -ruby -ruby-dev -gettext