Skip to content
Snippets Groups Projects
Commit f9883d54 authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

start nginx

parent e1fb5545
Branches
Tags
No related merge requests found
worker_processes 1;
events {
worker_connections 1024;
}
http {
# include mime.types;
# default_type application/octet-stream;
# sendfile on;
# tcp_nopush on;
# keepalive_timeout 0;
# keepalive_timeout 65;
server {
listen 8080;
location /discovery/ {
proxy_pass http://discovery.service.consul:5006/;
}
}
}
job "nginx" {
datacenters = ["dc1"]
type = "service"
update {
max_parallel = 1
min_healthy_time = "10s"
healthy_deadline = "3m"
auto_revert = false
}
group "nginx" {
count = 1
restart {
attempts = 2
interval = "30m"
delay = "15s"
mode = "fail"
}
task "nginx" {
driver = "docker"
config {
image = "nginx:latest"
volumes = ["/home/yakubov/projects/asapo/config/nomad/nginx.conf:/etc/nginx/nginx.conf","local/:/logs" ]
network_mode = "host"
dns_servers = ["127.0.0.1"]
dns_search_domains=["consul"]
}
resources {
cpu = 500 # 500 MHz
memory = 256 # 256MB
network {
mbits = 10
port "nginx" {
static = 8080
}
}
}
service {
port = "nginx"
name = "nginx"
check {
name = "alive"
type = "tcp"
interval = "10s"
timeout = "2s"
}
}
}
}
}
\ No newline at end of file
{
"Name": "discovery",
"Address": "127.0.0.1",
"Port": 5006,
"Check": {
"HTTP": "http://localhost:5006/receivers",
"Interval": "15s"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment