# -*- coding: utf-8 -*-
#
# Copyright (c) 2015-2016 Parisson SARL

# This file is part of Telemeta.

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.

# TimeSide is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.

# You should have received a copy of the GNU Affero General Public License
# along with TimeSide.  If not, see <http://www.gnu.org/licenses/>.

# Authors:
# Guillaume Pellerin <yomguy@parisson.com>
# Thomas Fillon <thomas@parisson.com>

# Usage : docker compose -f docker-compose.yml -f env/build.yml -f env/debug.yml -f env/dev.yml -f env/js_build.yml run --service-ports js_build

services:

  front_build:
    image: andreptb/grunt
    volumes_from:
      - app
    ports:
      - "9001:9000"
      - "35729:35729"
    command: sh -c "cd /srv/lib/timeside/timeside/player/static/timeside2; npm install --silent; bower install --allow-root; grunt build --force; npm prune --production;"
