From cde48f0108195ededdaf56cb3d5c62995c2dfda0 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 17 Mar 2015 12:19:09 +0100 Subject: [PATCH] Add a docker composition including mysql, add licences to compositions --- docker-compose-mysql.yml | 109 +++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 86 ++++++++++++++++++------------ 2 files changed, 161 insertions(+), 34 deletions(-) create mode 100644 docker-compose-mysql.yml diff --git a/docker-compose-mysql.yml b/docker-compose-mysql.yml new file mode 100644 index 0000000..c4a5b76 --- /dev/null +++ b/docker-compose-mysql.yml @@ -0,0 +1,109 @@ +# -*- 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/timeside + command: /bin/true + +db: + image: mysql + volumes_from: + - lib + - log + environment: + - MYSQL_ROOT_PASSWORD=mysecretpassword + - MYSQL_DATABASE=timeside + - MYSQL_USER=timeside + - MYSQL_PASSWORD=changeme + +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: + - home + command: /bin/sh /opt/TimeSide/examples/deploy/celery_app.sh + links: + - rabbitmq + - 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 07506a4..26b5705 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,26 @@ -# Volumes +# -*- 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 @@ -22,22 +44,10 @@ lib: - /var/lib/mysql command: /bin/true -home: - image: debian:wheezy - volumes: - - ./examples/sandbox:/home/timeside - command: /bin/true - -db: - image: mysql - volumes_from: - - lib - - log - environment: - - MYSQL_ROOT_PASSWORD=mysecretpassword - - MYSQL_DATABASE=timeside - - MYSQL_USER=timeside - - MYSQL_PASSWORD=changeme +# db: +# image: postgres +# volumes_from: +# - datadb rabbitmq: image: rabbitmq:3-management @@ -46,23 +56,6 @@ rabbitmq: 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: @@ -72,6 +65,9 @@ worker: - rabbitmq - app + +# --- TimeSide containers --- + nginx: image: nginx ports: @@ -85,3 +81,25 @@ 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 + -- 2.39.5