RUN mkdir /srv/app
RUN mkdir /srv/lib
-WORKDIR /srv/app
+WORKDIR /srv
RUN apt-get update && apt-get install apt-transport-https
COPY etc/apt/sources.list /etc/apt/
-COPY debian-requirements.txt /srv/app/
+COPY debian-requirements.txt /srv
RUN apt-get update && \
- DEBIAN_PACKAGES=$(egrep -v "^\s*(#|$)" debian-requirements.txt) && \
+ DEBIAN_PACKAGES=$(egrep -v "^\s*(#|$)" /srv/debian-requirements.txt) && \
apt-get install -y --force-yes $DEBIAN_PACKAGES && \
echo fr_FR.UTF-8 UTF-8 >> /etc/locale.gen && \
locale-gen && \
ENV LANGUAGE fr_FR:fr
ENV LC_ALL fr_FR.UTF-8
-ADD requirements.txt /srv/app/
+COPY requirements.txt /srv
RUN pip install -r requirements.txt
-ADD requirements-dev.txt /srv/app/
+COPY requirements-dev.txt /srv
RUN pip install -r requirements-dev.txt --src /srv/lib
+COPY package.json /srv
+RUN npm install
+
+COPY Gemfile /srv
+RUN gem install bundler
+RUN bundle install
+
+COPY bower.json /srv
RUN npm install -g bower
+RUN bower --allow-root install
+
+COPY gulpfile.js /srv
+RUN npm install -g gulp
+RUN gulp build
+
+WORKDIR /srv/app
--- /dev/null
+#!/bin/sh
+
+docker-compose run app bash -c "cd /srv && bower install && gulp build"
#!/bin/sh
-# Use this script to update a dev/prod server
-
git pull
git submodule foreach git pull
docker-compose run app python /srv/app/manage.py migrate
# docker-compose run app python /srv/app/manage.py update_translation_fields
-bower install
-gulp build
+docker-compose run app bash -c "cd /srv && bower install && gulp build"
docker-compose run app python /srv/app/manage.py collectstatic --noinput
docker-compose run app bash /srv/doc/build.sh
bzip2
build-essential
netcat
-npm
+nodejs
locales
pandoc
-nodejs-legacy
vim
python-sphinx
+ruby
+ruby-dev
uwsgi logs (not versioned)
- bower.json \
- javascript dependencies (cf `Front`_ section)
+ javascript dependencies
- debian-requirements.txt \
- used by docker to install debian packages (cf `In case of broken app`_ section)
+ used by docker to install debian packages
- docker-compose.yml \
- description of all docker containers. This file is used by command "docker-compose" (cf `In case of broken app`_ section)
+ configuration file for docker containers used by docker-compose
- Dockerfile \
- instructions to build app image (cf `In case of broken app`_ section)
+ instructions to build the app image
- Gemfile \
- gem dependecies for ruby. For our case, it will install _Sass and _Compass. (cf `Front`_ section)
+ gem dependecies for ruby. For our case, it will install _Sass and _Compass.
- gulpfile.js \
- script to compile all css, js files (cf `Front`_ section)
+ script to compile all CSS and JS files
- install.py \
- cf section 'Install as a daemon' (cf `Install as a daemon`_ section)
+ daemon and init boot script installer (Linux only)
- package.json \
- gulp dependencies when running "gulp install" (cf `Front`_ section)
+ gulp dependencies when running "gulp install"
- requirements-dev.txt \
- application package in dev version (cf `In case of broken app`_ section)
+ application package in dev version
- requirements.txt \
- application package (cf `In case of broken app`_ section)
+ application package
represent projects related to a team or a person
- shop \
manage product from prestashop (softwares and subscriptions), using _Cartridge
+
+
+.. _Compass : http://compass-style.org/
+.. _Sass: http://sass-lang.com/
architecture
install
development
- production
maintenance
copyright
- licence
+ license
Indices and tables
==================
git clone --recursive https://github.com/Ircam-RnD/mezzanine-organization.git
-Compile static files
-+++++++++++++++++++++
-
-Gulp_ allow to compile scss to css, concatenate js files and has a watcher, who do this tasks on file change.
-Gulp_ require NodeJS_ installed on your computer to work.
-
-1. Install gulp globally::
-
- sudo npm install --g gulp
-
-2. Install bower globally::
-
- sudo npm install -g bower
-
-3. Install gulp dependencies::
-
- npm install
-
-4. Install ruby dependencies::
-
- sudo apt install ruby
- sudo gem install bundler
- bundle install
-
-5. Build::
-
- bower install
- gulp build
-
-
-/!\ If you have an issue with ffi module, try to install dev package from ruby::
-
- apt-get install ruby-dev
-
-
Start
+++++
+Our docker composition already bundles some powerful containers and bleeding edge frameworks like: Nginx, MySQL, Redis, Celery, Django and Python. It thus provides a safe and continuous way to deploy your project from an early development stage to a massive production environment.
+
For a production environment setup::
cd mezzanine-organization
docker-compose up
-which builds, (re)creates, starts, and attaches to containers.
+which builds, (re)creates, starts, and attaches all containers.
Then browse the app at http://localhost:8020/
On MacOS or Windows, we need to replace 'localhost' by the IP given by the docker terminal.
+.. warning :: Before any serious production usecase, you *must* modify all the passwords and secret keys in the configuration files of the sandbox.
+
Daemonize
+++++++++++
--systemd : use systemd
--composition_file : the path of the YAML composition file to use (optional)
-This will install a init script in /etc/init.d. For example, if your app directory is named `mezzanine-organization`, `/etc/init.d/mezzanine-organization` becomes the init script for the OS booting procedure and for you if you need to start the daemon by hand::
+This will install a init script in /etc/init.d. For example, if your app directory is named `mezzanine-organization` then `/etc/init.d/mezzanine-organization` becomes the init script for the OS booting procedure and for you if you need to start the daemon by hand::
sudo /etc/init.d/mezzanine-organization start
.. _Gulp: http://gulpjs.com/
.. _Mezzanine-Agenda : https://github.com/jpells/mezzanine-agenda
.. _Cartridge : https://github.com/stephenmcd/cartridge/
-.. _Sass: http://sass-lang.com/
-.. _Compass : http://compass-style.org/
- var/log/uwsgi/app.log \
uwsgi log of the app
-Upgrade
-+++++++++
-Upgrade application, all dependencies, data from master branch and also recompile assets::
+Backup & restore
++++++++++++++++++
- bin/upgrade.sh
+To backup the database and all the media, this will push all of them to the var submodule own repository::
+ bin/push.sh
-Backup & restore DB
-++++++++++++++++++++
+.. warning :: use this ONLY from the **production** environment!
-To backup the database and push it to the var (data) own repository (**only** prod!)::
+To restore the backuped the database, all the media and rebuild front ()::
- bin/push.sh
+ bin/pull.sh
-To restore the backuped database and rebuild front::
+.. warning :: use this ONLY from the **development** environment!
- bin/pull.sh
+
+Upgrade
++++++++++
+
+Upgrade application, all dependencies, data from master branch and also recompile assets::
+
+ bin/upgrade.sh
Repair
docker-compose rm
docker-compose up
-In case you have installed the init script to run the app as a daemon (cf. section "Install as a daemon"), you can use it to restart the app:
+In case you have installed the init script to run the app as a daemon (cf. section "Daemonize"), you can use it to restart the app:
/etc/init.d/mezzanine-organization restart
This application is a CMS for organizations with workflows
-It is based on Mezzanine and Django.
+It is based on Mezzanine_ and Django_.
Use cases
==========
+++ /dev/null
-
-Production
-===========
-
-Deploying
----------
-
-Our docker composition already bundles some powerful containers and bleeding edge frameworks like: Nginx, MySQL, Redis, Celery, Django and Python. It thus provides a safe and continuous way to deploy your project from an early development stage to a massive production environment.
-
-.. warning :: Before any serious production usecase, you *must* modify all the passwords and secret keys in the configuration files of the sandbox.
-
-The best
-
-Scaling
---------
-
-Thanks to Celery, each TimeSide worker of the server will process each task asynchronously over independant threads so that you can load all the cores of your CPU.
-
-To scale it up through your cluster, Docker provides some nice tools for orchestrating it very easily: `Machine and Swarm <https://blog.docker.com/2015/02/orchestrating-docker-with-machine-swarm-and-compose/>`_.
+++ /dev/null
-
-Sponsors and Partners
-=====================
-
-* `Parisson <http://parisson.com>`_
-* `CNRS <http://www.cnrs.fr>`_ (National Center of Science Research, France)
-* `Huma-Num <http://www.huma-num.fr/>`_ (big data equipment for digital humanities, ex TGE Adonis)
-* `CREM <http://www.crem-cnrs.fr>`_ (french National Center of Ethomusicology Research, France)
-* `Université Pierre et Marie Curie <http://www.upmc.fr>`_ (UPMC Paris, France)
-* `ANR <http://www.agence-nationale-recherche.fr/>`_ (CONTINT 2012 project : DIADEMS)
-* `MNHN <http://www.mnhn.fr>`_ : Museum National d'Histoire Naturelle (Paris, France)
-
-
-Related projects
-=================
-
-* `Telemeta <http://telemeta.org>`__ : open web audio platform
-* `Sound archives <http://archives.crem-cnrs.fr/>`_ of the CNRS, CREM and the "Musée de l'Homme" in Paris, France.
-* The `DIADEMS project <http://www.irit.fr/recherches/SAMOVA/DIADEMS/en/welcome/>`_ sponsored by the ANR.
deb http://mirrors.ircam.fr/pub/debian/ jessie-updates main
deb-src http://mirrors.ircam.fr/pub/debian/ jessie-updates main
+
+deb http://mirrors.ircam.fr/pub/debian/ jessie-backports main contrib non-free
+deb-src http://mirrors.ircam.fr/pub/debian/ jessie-backports main contrib non-free
+
+deb https://deb.nodesource.com/node_6.x jessie main
+deb-src https://deb.nodesource.com/node_6.x jessie main