Parcourir la source

Create deployment strategy

Arkadiusz Ryś il y a 2 ans
Parent
commit
e2caae4cde
3 fichiers modifiés avec 138 ajouts et 0 suppressions
  1. 126 0
      docker-compose.yml
  2. 7 0
      tesks.py
  3. 5 0
      update.sh

+ 126 - 0
docker-compose.yml

@@ -0,0 +1,126 @@
+version: "3.8"
+
+services:
+  models:
+    image: registry.rys.one/dtdesign/models:1.0.0
+    container_name: models
+    networks:
+      web:
+        ipv4_address: 172.30.200.10
+    dns:
+      - 192.168.0.11
+      - 1.1.1.1
+      - 1.0.0.1
+      - 8.8.8.8
+      - 8.8.4.4
+    labels:
+      - "diun.enable=true"
+    restart: unless-stopped
+    volumes:
+      - "./build:/app/build"
+    env_file:
+      - "./config/models.env"
+
+  spendpoint:
+    image: registry.rys.one/dtdesign/spendpoint:1.0.0
+    container_name: spendpoint
+    networks:
+      web:
+        ipv4_address: 172.30.200.20
+    dns:
+      - 192.168.0.11
+      - 1.1.1.1
+      - 1.0.0.1
+      - 8.8.8.8
+      - 8.8.4.4
+    labels:
+      - "traefik.enable=true"
+      - "traefik.http.routers.spendpoint.entrypoints=web-secure"
+#      - "traefik.http.routers.spendpoint.rule=Host(`ontology.rys.app`) && PathPrefix(`/sparql/`)"
+      - "traefik.http.routers.spendpoint.rule=Host(`ontology.rys.app`)"
+      - "traefik.http.routers.spendpoint.tls.certresolver=letsencrypt"
+      - "traefik.http.routers.spendpoint.service=spendpoint-svc"
+      - "traefik.http.services.spendpoint-svc.loadbalancer.server.port=80"
+      - "diun.enable=true"
+    depends_on:
+      - models
+    restart: unless-stopped
+    volumes:
+      - "./build:/app/build:ro"
+    env_file:
+      - "./config/spendpoint.env"
+
+  graph-exploring-tool:
+    image: registry.rys.one/dtdesign/graph-exploring-tool:1.0.0
+    container_name: graph-exploring-tool
+    networks:
+      web:
+        ipv4_address: 172.30.200.30
+    dns:
+      - 192.168.0.11
+      - 1.1.1.1
+      - 1.0.0.1
+      - 8.8.8.8
+      - 8.8.4.4
+    labels:
+      - "diun.enable=true"
+    depends_on:
+      - models
+      - spendpoint
+    restart: unless-stopped
+    volumes:
+      - "./palette:/app/palette:ro"
+    env_file:
+      - "./config/graph-exploring-tool.env"
+
+  fuseki:
+    image: registry.rys.one/dtdesign/fuseki:1.0.0
+    container_name: fuseki
+    networks:
+      web:
+        ipv4_address: 172.30.200.40
+    dns:
+      - 192.168.0.11
+      - 1.1.1.1
+      - 1.0.0.1
+      - 8.8.8.8
+      - 8.8.4.4
+    labels:
+      - "traefik.enable=true"
+      - "traefik.http.routers.fuseki.entrypoints=web-secure"
+      - "traefik.http.routers.fuseki.rule=Host(`fuseki.rys.app`)"
+      - "traefik.http.routers.fuseki.tls.certresolver=letsencrypt"
+      - "traefik.http.routers.fuseki.service=fuseki-svc"
+      - "traefik.http.services.fuseki-svc.loadbalancer.server.port=80"
+      - "diun.enable=true"
+    depends_on:
+      - spendpoint
+    restart: unless-stopped
+    volumes:
+      - "./build:/app/ingest:ro"
+    env_file:
+      - "./config/fuseki.env"
+
+  outlier:
+    image: registry.rys.one/dtdesign/models/outlier:1.0.0
+    container_name: outlier
+    networks:
+      web:
+        ipv4_address: 172.30.200.50
+    dns:
+      - 192.168.0.11
+      - 1.1.1.1
+      - 1.0.0.1
+      - 8.8.8.8
+      - 8.8.4.4
+    labels:
+      - "diun.enable=true"
+    restart: unless-stopped
+    volumes:
+      - "./data:/app/data"
+    env_file:
+      - "./config/outlier.env"
+
+networks:
+  web:
+    external: true

+ 7 - 0
tesks.py

@@ -0,0 +1,7 @@
+from invoke import task
+
+
+@task
+def demo(c):
+    """"""
+    pass

+ 5 - 0
update.sh

@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+docker-compose stop
+docker-compose pull
+docker-compose up -d