Compare commits

..

3 Commits

5 changed files with 107 additions and 0 deletions

View File

@ -23,6 +23,14 @@
- import_playbook: initialize.yml
- name: Build image
hosts: virtualization
vars_files:
- vars/applications.yml
tasks:
- import_tasks: tasks/docker/build.yml
- name: Configure datastore
hosts: jupiter
vars_files:

View File

@ -0,0 +1,55 @@
---
version: "{{ omni_compose_version | string }}"
networks:
scipio:
name: scipio
driver: overlay
ipam:
driver: default
config:
- subnet: {{ omni_compose_apps.scipio.networks.main }}
volumes:
scipio:
name: datastore{{ omni_compose_apps.scipio.datastore }}
driver: glusterfs
services:
database:
image: mariadb:10
hostname: scipio-database
networks:
- scipio
volumes:
- type: volume
source: scipio
target: /var/lib/mysql
read_only: false
environment:
MYSQL_ROOT_PASSWORD: {{ omni_compose_app_secrets.scipio.database_password }}
MYSQL_DATABASE: scipio
deploy:
replicas: 1
phantom:
image: scipio:{{ omni_compose_apps.scipio.versions.phantom | default(omni_compose_apps.scipio.versions.default) }}
hostname: scipio-phantom
networks:
- scipio
environment:
SCIPIO_INTERVAL: "30"
SCIPIO_DB_BACKEND: MARIA
SCIPIO_DB_HOST: scipio-database
SCIPIO_DB_PORT: "3306"
SCIPIO_DB_USERNAME: root
SCIPIO_DB_PASSWORD: {{ omni_compose_app_secrets.scipio.database_password }}
SCIPIO_DB_SCHEMA: scipio
SCIPIO_PHANTOM_FEED: https://blog.tipranks.com/feed/
SCIPIO_PHANTOM_HANDLER: tipranks
command: --phantom --verbose
deploy:
replicas: 1

23
tasks/docker/build.yml Normal file
View File

@ -0,0 +1,23 @@
---
- name: Clone repositories
when: item.value.build is defined
git:
dest: /tmp/{{ item.key }}
repo: "{{ item.value.build.repository }}"
version: "{{ item.value.build.version }}"
loop: "{{ omni_compose_apps | dict2items }}"
loop_control:
label: "{{ item.key }}"
- name: Build image
when: item.value.build is defined
docker_image:
source: build
name: "{{ item.key }}"
tag: "{{ item.value.build.version }}"
build:
path: /tmp/{{ item.key }}
rm: true
loop: "{{ omni_compose_apps | dict2items }}"
loop_control:
label: "{{ item.key }}"

View File

@ -72,3 +72,8 @@ omni_users:
uid: 1292
targets: [datastore]
svc: true
- name: mech_scipio
uid: 1291
targets: [datastore]
svc: true

View File

@ -84,3 +84,19 @@ omni_compose_apps:
main: 192.168.100.0/24
versions:
default: "5.12"
scipio:
build:
repository: git@github.com:tjyork/Scipio.git
version: 0.2.0
datastore: /appdata/scipio
account:
name: mech_scipio
uid: 1291
published:
host: scipio.net.enp.one
ports:
8081: 8080
networks:
main: 192.168.106.0/24
versions:
default: latest