nomad

HCL and Docker files for Nomad deployments
git clone https://git.in0rdr.ch/nomad.git
Log | Files | Refs | Pull requests |Archive

commit a9a55f34750da172bfd0617e4465d2e393f0682a
parent 2c5b1817142376906be6a36a3c02d5db5aa5ed22
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Fri, 11 Oct 2024 02:23:49 +0200

feat(myheats-doc): bind proxy port

Diffstat:
Mdocker/docker-myheats-nginx/README.md | 7++++---
Mdocker/docker-myheats-nginx/docker-compose.yml | 10+++++++++-
Mdocker/docker-myheats-nginx/init-db.sh | 5+----
Mdocker/docker-myheats-nginx/proxy.conf | 6+++---
4 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/docker/docker-myheats-nginx/README.md b/docker/docker-myheats-nginx/README.md @@ -61,12 +61,13 @@ Cheap and cheerful. - Install podman - Configure certbot -3 - Clone repo +3 - Clone repos (Podman and db schema) + git clone --depth=1 https://git.in0rdr.ch/myheats.git myheats.git git clone --depth=1 https://git.in0rdr.ch/nomad.git nomad.git cd nomad.git/docker/docker-myheats-nginx/ 4 - Run podman services (frontend, api, db) - podman login registry.digitalocean.com/myheats - podman-compose up -d + sudo podman login registry.digitalocean.com/myheats + sudo podman-compose up -d diff --git a/docker/docker-myheats-nginx/docker-compose.yml b/docker/docker-myheats-nginx/docker-compose.yml @@ -7,9 +7,16 @@ services: proxy: container_name: proxy image: docker.io/library/nginx:stable-alpine + # wait for other services + command: ["sh", "-c", "sleep 10 && nginx -g 'daemon off;'"] + #command: ["sh", "-c", "sleep 3600"] volumes: - ./proxy.conf:/etc/nginx/conf.d/proxy.conf:ro - - /etc/letsencrypt:/etc/letsencrypt:ro + - ./certs:/etc/nginx/certs:ro + ports: + - target: 8443 + published: 443 + protocol: tcp networks: - myheats @@ -34,6 +41,7 @@ services: volumes: - ./data/pgdata:/var/lib/postgresql/data - ./init-db.sh:/docker-entrypoint-initdb.d/init-db.sh:ro + - ~/myheats.git/schema:/schema:ro networks: - myheats diff --git a/docker/docker-myheats-nginx/init-db.sh b/docker/docker-myheats-nginx/init-db.sh @@ -1,7 +1,4 @@ #!/bin/bash set -e -git clone --depth=1 https://git.in0rdr.ch/myheats.git myheats.git -/schema/99-init-db.sql - -cat ./myheats.git/schema/*.sql | psql -h 127.0.0.1 -U postgres -p 5432 +cat /schema/*.sql | psql -U postgres diff --git a/docker/docker-myheats-nginx/proxy.conf b/docker/docker-myheats-nginx/proxy.conf @@ -1,8 +1,8 @@ server { - listen 443 ssl; + listen 8443 ssl; - ssl_certificate /etc/letsencrypt/live/savognin.p0c.ch/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/savognin.p0c.ch/privkey.pem; + ssl_certificate /etc/nginx/certs/fullchain.pem; + ssl_certificate_key /etc/nginx/certs/privkey.pem; location / { proxy_pass http://myheats-frontend:80;