Skip to content

Commit

Permalink
hxl-proxy (#2): started docker/full-stack
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed Apr 6, 2020
1 parent 901a1e0 commit b01b797
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 14 deletions.
7 changes: 7 additions & 0 deletions ansible/inventories/etica.dev/hosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ all:
# traefik_force_reinstall: yes
# traefik_force_reinstall: yes
traefik_debug_devel: yes

# @see https://github.com/geerlingguy/ansible-role-pip#role-variables
# By default, geerlingguy.pip will use pip from python 2.7.
# You can force on your inventory use another pip. On case of
# Ubuntu 18.04, you can explicitly force the pip package and pip executable:
pip_package: "python3-pip"
pip_executable: "pip3"
3 changes: 2 additions & 1 deletion ansible/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
# ansible-playbook -i inventories/etica.dev playbook.yml
- import_playbook: playbooks/ping-all.yml
- import_playbook: playbooks/common.yml
- import_playbook: playbooks/docker.yml
- import_playbook: playbooks/traefik.yml
- import_playbook: playbooks/docker-setup-host.yml
- import_playbook: playbooks/docker-full-stack-start.yml
25 changes: 25 additions & 0 deletions ansible/playbooks/docker-full-stack-start.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
# FILE: playbooks/docker-full-stack-start.yml
# LICENSE: Public Domain
# DESCRIPTION:
#
# REQUIRES: pip install docker

# ansible-playbook -i inventories/etica.dev playbooks/docker-full-stack-start.yml

- name: Run using a project directory
hosts: all
gather_facts: yes
tasks:
# - name: Tear down existing services
# docker_compose:
# project_src: flask
# state: absent

- name: Create and start services
docker_compose:
project_src: "{{ playbook_dir }}/../../docker/full-stack"
register: output

- debug:
var: output
12 changes: 0 additions & 12 deletions ansible/playbooks/docker-install.yml

This file was deleted.

24 changes: 24 additions & 0 deletions ansible/playbooks/docker-setup-host.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
# FILE: playbooks/docker-setup-host.yml
# LICENSE: Public Domain
# DESCRIPTION: Install docker on the host
#
# REQUIES: geerlingguy.docker Role (https://github.com/geerlingguy/ansible-role-docker)
# REQUIES: geerlingguy.pip Role (https://github.com/geerlingguy/ansible-role-pip)

# ansible-playbook -i inventories/etica.dev playbooks/docker-setup-host.yml

- hosts: all
vars:

# By default, geerlingguy.pip will use pip from python 2.7.
# You can force on your inventory use another pip. On case of
# Ubuntu, you can use:
# pip_executable: "python3-pip"


pip_install_packages:
- name: docker
roles:
- geerlingguy.pip
- geerlingguy.docker
6 changes: 5 additions & 1 deletion ansible/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
#
# USAGE: ansible-galaxy install -r requirements.yml

# from galaxy
# https://github.com/geerlingguy/ansible-role-docker
- src: geerlingguy.docker
# Tested with v2.7.0, 2020-04-05

# https://github.com/geerlingguy/ansible-role-pip
- src: geerlingguy.pip
# Tested with v1.3.0, 2018-11-10
15 changes: 15 additions & 0 deletions docker/full-stack/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: "3"

# See https://docs.docker.com/compose/django/

services:
# hxldash:

hxl-proxy:
image: unocha/hxl-proxy:latest
command: python manage.py runserver 0.0.0.0:8000
depends_on:
- postgres_hxl-proxy

postgres_hxl-proxy:
image: postgres

0 comments on commit b01b797

Please sign in to comment.