From a80f7b399627c721d6e8105c8a6c87276ef7d48f Mon Sep 17 00:00:00 2001 From: Peter Schiffer Date: Tue, 31 May 2016 02:23:39 +0200 Subject: [PATCH] Added ansible 2.1 demo --- ansible-2.1-demo/docker-compose.yml | 35 +++++++++++++++++++++++++++++ ansible-2.1-demo/docker.yml | 8 +++++++ 2 files changed, 43 insertions(+) create mode 100644 ansible-2.1-demo/docker-compose.yml create mode 100644 ansible-2.1-demo/docker.yml diff --git a/ansible-2.1-demo/docker-compose.yml b/ansible-2.1-demo/docker-compose.yml new file mode 100644 index 0000000..3d8c43f --- /dev/null +++ b/ansible-2.1-demo/docker-compose.yml @@ -0,0 +1,35 @@ +web: + build: . + ports: + - "8000:8000" + volumes: + - ./channels-example/:/opt/app/channels-example/ + links: + - db + - redis + environment: + - DATABASE_URL=postgres://user:openhouse2016@db:5432/chat + - REDIS_URL=redis://redis:6379/1 +db: + image: praiskup/postgresql:APIv1.0.1-fedora23 +# volumes: +# - ./db:/var/lib/pgsql/data + environment: + - POSTGRESQL_DATABASE=chat + - POSTGRESQL_USER=user + - POSTGRESQL_PASSWORD=openhouse2016 + - POSTGRESQL_CONTAINER_OPTS=assert_external_data = false +worker: + build: . + environment: + - DATABASE_URL=postgres://user:openhouse2016@db:5432/chat + - REDIS_URL=redis://redis:6379/1 + links: + - db + - redis + volumes: + - ./channels-example/:/opt/app/channels-example/ + command: python /opt/app/channels-example/manage.py runworker -v3 +redis: + image: redis + diff --git a/ansible-2.1-demo/docker.yml b/ansible-2.1-demo/docker.yml new file mode 100644 index 0000000..0fdd4c5 --- /dev/null +++ b/ansible-2.1-demo/docker.yml @@ -0,0 +1,8 @@ +- name: Deploy the service + hosts: localhost + connection: local + gather_facts: no + tasks: + - docker_service: + project_src: /home/ttomecek/g/open-house-2016-demo/ + state: present