]> git.parisson.com Git - mezzo.git/commitdiff
Update theme config, Fix gulp installer version
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 4 Apr 2017 17:22:00 +0000 (19:22 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 4 Apr 2017 17:22:00 +0000 (19:22 +0200)
16 files changed:
Dockerfile [new file with mode: 0644]
Gemfile [new file with mode: 0644]
app/Dockerfile [deleted file]
app/Gemfile [deleted file]
app/bin/app.sh
app/bin/init.sh
app/local_settings.py
app/package.json [deleted file]
app/requirements.txt [deleted file]
app/settings.py
bin/build_front.sh
docker-compose.yml
package.json [new file with mode: 0644]
requirements-debian.txt [new file with mode: 0644]
requirements-python.txt [new file with mode: 0644]
requirements.txt [deleted file]

diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..6533730
--- /dev/null
@@ -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 (file)
index 0000000..039d053
--- /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 (file)
index 5e7b7f6..0000000
+++ /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 (file)
index 039d053..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-source "https://rubygems.org"
-ruby "2.1.5"
-gem "compass", "<= 1.0.3"
-gem "sass", "<= 3.4.22"
index 475bba6d30b703e69ac5f8d8a12012be33e42ace..2794571af482a030f4ccea2074cc3edf46656b2d 100755 (executable)
@@ -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
 
index 9a27441d7de1839eec682e24c813fbb04be1519a..b513d9ad43d33b68fa1ea986af554506f373b589 100755 (executable)
@@ -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
index 6119212d3c3892b55d5ebd7a961abf9feb3fdb62..620762fe4660029129235ad9a0b6dbc8884dc48e 100644 (file)
@@ -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 (file)
index cd0b125..0000000
+++ /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 (file)
index 05f8196..0000000
+++ /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
index 7f31d28771ed126d55491f9729c2797b4b7e2d47..ad4165f1c975f300b2ceaa804ba1144f06859ef0 100644 (file)
@@ -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,
index 6cf2d1af0f965de6444a9076765f8fc6c0bde878..37cae0700dee6e9ce81d6bff556ce116c5159bae 100755 (executable)
@@ -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
index e63143f5f54c2d70dd494fc467f3e61f39ae1ca6..36a2ccdc8a00eb602dda50a127e1a5bbab781129 100644 (file)
@@ -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 (file)
index 0000000..ab4485c
--- /dev/null
@@ -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 (file)
index 0000000..621b42c
--- /dev/null
@@ -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 (file)
index 0000000..1143dac
--- /dev/null
@@ -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 (file)
index 621b42c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-git
-wget
-bzip2
-build-essential
-netcat
-nodejs
-locales
-pandoc
-vim
-python-sphinx
-ruby
-ruby-dev
-gettext