From: Guillaume Pellerin Date: Thu, 19 Mar 2015 11:36:39 +0000 (+0100) Subject: merge mysql composition X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=2395c8c340f661d97cc2f7bccdff278589692e95;p=timeside.git merge mysql composition --- diff --git a/docker-compose-mysql.yml b/docker-compose-mysql.yml deleted file mode 100644 index b051292..0000000 --- a/docker-compose-mysql.yml +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (c) 2015 Parisson SARL - -# This file is part of TimeSide. - -# TimeSide is free software: you can redistribute it and/or modify -# it under the terms of the GNU 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 General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with TimeSide. If not, see . - -# Authors: -# Guillaume Pellerin -# Thomas Fillon - - -static: - image: debian:wheezy - volumes: - - /var/www/static - command: true - -log: - image: debian:wheezy - volumes: - - /var/log/nginx - - /var/log/postgres - - /var/log/uwsgi - command: /bin/true - -lib: - image: debian:wheezy - volumes: - - /var/lib/rabbitmq - - /var/lib/postgres - - /var/lib/mysql - command: /bin/true - -home: - image: debian:wheezy - volumes: - - ./examples/sandbox:/home/sandbox - command: /bin/true - -db: - image: mysql - volumes_from: - - lib - - log - environment: - - MYSQL_ROOT_PASSWORD=mysecretpassword - - MYSQL_DATABASE=sandbox - - MYSQL_USER=root - - MYSQL_PASSWORD=mysecretpassword - -rabbitmq: - image: rabbitmq:3-management - ports: - - "15672:15672" - expose: - - "5672" - -app: - build: . - volumes: - - .:/opt/TimeSide - volumes_from: - - static - - home - - log - command: /bin/sh /opt/TimeSide/examples/deploy/start_app.sh - ports: - - "9000:9000" - expose: - - "8000" - links: - - rabbitmq - - db - -worker: - build: . - volumes_from: - - app - command: /bin/sh /opt/TimeSide/examples/deploy/celery_app.sh - links: - - rabbitmq - - db - - app - -nginx: - image: nginx - ports: - - "8000:80" - volumes: - - ./examples/deploy/nginx-app.conf:/etc/nginx/conf.d/default.conf - volumes_from: - - static - - home - - log - links: - - app - diff --git a/docker-compose.yml b/docker-compose.yml index 26b5705..b051292 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -44,10 +44,22 @@ lib: - /var/lib/mysql command: /bin/true -# db: -# image: postgres -# volumes_from: -# - datadb +home: + image: debian:wheezy + volumes: + - ./examples/sandbox:/home/sandbox + command: /bin/true + +db: + image: mysql + volumes_from: + - lib + - log + environment: + - MYSQL_ROOT_PASSWORD=mysecretpassword + - MYSQL_DATABASE=sandbox + - MYSQL_USER=root + - MYSQL_PASSWORD=mysecretpassword rabbitmq: image: rabbitmq:3-management @@ -56,18 +68,33 @@ rabbitmq: expose: - "5672" -worker: +app: build: . + volumes: + - .:/opt/TimeSide volumes_from: + - static - home + - log + command: /bin/sh /opt/TimeSide/examples/deploy/start_app.sh + ports: + - "9000:9000" + expose: + - "8000" + links: + - rabbitmq + - db + +worker: + build: . + volumes_from: + - app command: /bin/sh /opt/TimeSide/examples/deploy/celery_app.sh links: - rabbitmq + - db - app - -# --- TimeSide containers --- - nginx: image: nginx ports: @@ -81,25 +108,3 @@ nginx: links: - app -home: - image: debian:wheezy - volumes: - - ./examples/sandbox:/home/timeside - command: /bin/true - -app: - build: . - volumes: - - .:/opt/TimeSide - volumes_from: - - static - - home - - log - command: /bin/sh /opt/TimeSide/examples/deploy/start_app.sh - ports: - - "9000:9000" - expose: - - "8000" #default runserver wsgi port - links: - - rabbitmq -