Advertisement
fedorm

fedorm

Jan 18th, 2019
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 0.91 KB | None | 0 0
  1. job "coupons-processing" {
  2.  
  3.   datacenters = ["dc1"]
  4.  
  5.   type = "system"
  6.  
  7.   update {
  8.     max_parallel = 1
  9.     min_healthy_time = "30s"
  10.     healthy_deadline = "5m"
  11.     auto_revert      = true
  12.   }
  13.  
  14.   group "processing" {
  15.     task "processing" {
  16.       driver = "docker"
  17.      
  18.       config {
  19.     image = "artifactory.setmachine.ru:5000/coupon-processing/psql:localtest"
  20.    
  21.     auth {
  22.       username = "admin"
  23.       password = "tc324012"
  24.     }
  25.  
  26.     port_map = {
  27.       http = 8008,
  28.       tcp = 5432
  29.     }
  30.  
  31.     dns_servers = ["${NOMAD_IP_http}"]
  32.       }
  33.  
  34.       env {
  35.     "PATRONI_CONSUL_HOST"="${NOMAD_IP_http}:8500"
  36.     "PATRONI_NAME"="dbnode_${NOMAD_IP_http}"
  37.     "PATRONI_RESTAPI_CONNECT_ADDRESS"="${NOMAD_IP_http}:8008"
  38.     "PATRONI_POSTGRESQL_CONNECT_ADDRESS"="${NOMAD_IP_http}:5432"
  39.     }
  40.  
  41.       resources {
  42.     cpu = 1000
  43.     memory = 1500
  44.     network {
  45.           port "http" {
  46.             static = "8008"
  47.     },
  48.           port "tcp" {
  49.             static = "5432"
  50.     }
  51.     }
  52.       }
  53.     }
  54.   }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement