nomad

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

commit f21823d8d477cca68bdd56a7b6ed8bd937876696
parent 3ff3db55b221f3f7c66a56dc39e36f50b8c0c404
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Fri, 18 Oct 2024 21:07:29 +0200

feat(myheats-nginx): add env_file

Diffstat:
Adocker/docker-myheats-nginx/.env | 48++++++++++++++++++++++++++++++++++++++++++++++++
Mdocker/docker-myheats-nginx/docker-compose.yml | 4++--
2 files changed, 50 insertions(+), 2 deletions(-)

diff --git a/docker/docker-myheats-nginx/.env b/docker/docker-myheats-nginx/.env @@ -0,0 +1,48 @@ +############ +# Frontend # +############ + +# Application window title +VITE_APP_DOC_TITLE='My Heats' +# Cookie TTL in seconds (session ttl in the admin/judges frontend), 60m +VITE_SESSION_TTL=3600 +# Full URI to backend http API +VITE_API_URI=http://myheats-api +# Backend API http port +VITE_API_PORT=8000 +# Full URI to backend websocket API +VITE_WS_URI=ws://myheats-api +# Backend API websocket port +VITE_WS_PORT=8000 +# Locale for frontend date formatting +VITE_LOCALE=en-US + +########### +# Backend # +########### + +API_REDIRECT_URI=http://myheats-frontend/authverify +# Backend API CORS allowed origins +API_CORS_ALLOW_ORIGIN=http://myheats-frontend +# JWT secret for magic links (`openssl rand -base64 48`) +API_JWT_SECRET= +# JWT TTL in seconds, make it biger than VITE_SESSION_TTL, 60m +API_JWT_TTL=3600 + +# SMTP settings for sending magic links +SMTP_HOST= +# upgrade later with STARTTLS +SMTP_STARTTLS= +SMTP_PORT= +SMTP_USER= +SMTP_FROM= +SMTP_PASSWORD= + +# PostgreSQL environment variables +# https://github.com/porsager/postgres?tab=readme-ov-file#environmental-variables +# PGHOST, PGPORT, PGDATABASE, PGUSERNAME, PGPASSWORD, etc. +PGHOST=myheats-db +PGPORT=5432 +PGDATABASE=postgres +PGUSERNAME=postgres +PGPASSWORD=example diff --git a/docker/docker-myheats-nginx/docker-compose.yml b/docker/docker-myheats-nginx/docker-compose.yml @@ -23,12 +23,14 @@ services: myheats-frontend: container_name: myheats-frontend image: registry.digitalocean.com/myheats/myheats:latest + env_file: ".env.local" networks: - myheats myheats-api: container_name: myheats-api image: registry.digitalocean.com/myheats/myheats:api + env_file: ".env.local" networks: - myheats @@ -36,8 +38,6 @@ services: container_name: myheats-db image: docker.io/postgres:16-alpine shm_size: 128mb - environment: - POSTGRES_PASSWORD: example volumes: - ./data/pgdata:/var/lib/postgresql/data - ./init-db.sh:/docker-entrypoint-initdb.d/init-db.sh:ro