]> git.parisson.com Git - timeside.git/commitdiff
Add a docker composition including mysql, add licences to compositions
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 17 Mar 2015 11:19:09 +0000 (12:19 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 17 Mar 2015 11:19:09 +0000 (12:19 +0100)
docker-compose-mysql.yml [new file with mode: 0644]
docker-compose.yml

diff --git a/docker-compose-mysql.yml b/docker-compose-mysql.yml
new file mode 100644 (file)
index 0000000..c4a5b76
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+
+# Authors:
+# Guillaume Pellerin <yomguy@parisson.com>
+# Thomas Fillon <thomas@parisson.com>
+
+
+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
+
index 07506a4f53c5db24f273cc4fe0177b2ac0ffdd73..26b5705fdf65eb4de8e1d4415e076bb0ef0169f9 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
+
+# Authors:
+# Guillaume Pellerin <yomguy@parisson.com>
+# Thomas Fillon <thomas@parisson.com>
+
 
 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
+