libialany / Nomad_Databases

orchestrate postgres containers with nomad and traefik

Home Page:https://wiki.hacklab.org.bo/wiki/Nomad_y_bases_de_datos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nomad_Databases

Orchestrate postgres containers with nomad and traefik using nomad.

I wanted to create a project based on this one Infinite Databases with Nomad and Traefik, I had to repair that project because there were incorrect parameters.

nomad:

Nomad v1.7.2
BuildDate ......
Revision ....

start traefik:

nomad job run -var="token=zxcsdfsdf34534frvfd" traefik.nomad.hcl

start postgres:

nomad job run -var-file="dev.vars" <postgres>.nomad.hcl

start dynamic postgres:

bash test.sh

If you want to instantiate more database change this parameter:

new_word="NEW_WORD"

verify your ip:

psql postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${NAME_CONTAINER_DATABASE}.${DOMAIN}/${POSTGRES_DB_NAME}?sslmode=require

IMPORTANT: Setting sslmode=require for Traefik configuration. Without this setting, Traefik may function solely as a load balancer, the isolation of databases with sslmode=require.

the result!

:)

About

orchestrate postgres containers with nomad and traefik

https://wiki.hacklab.org.bo/wiki/Nomad_y_bases_de_datos


Languages

Language:HCL 96.8%Language:Shell 3.2%