Source database auth creds from the environment

Defaults to known values for development.
source the environment credentials so they're available at container build.
This commit is contained in:
Brian O'Reilly 2025-12-07 11:29:42 -05:00 committed by Brian O'Reilly
parent d66b7b8053
commit e55210c332
4 changed files with 17 additions and 3 deletions

1
.gitignore vendored
View File

@ -56,3 +56,4 @@ logs/
performance-logs/
# Temporary files
/static/asteroid.css

View File

@ -35,9 +35,9 @@ services:
image: postgres:16-alpine
container_name: asteroid-postgres
environment:
POSTGRES_DB: asteroid
POSTGRES_USER: asteroid
POSTGRES_PASSWORD: asteroid_db_2025
- POSTGRES_DB=${ASTEROID_DB_NAME:-asteroid}
- POSTGRES_USER=${ASTEROID_DB_USER:-asteroid}
- POSTGRES_PASSWORD=${ASTEROID_DB_PASSWORD:-asteroid_db_2025}
ports:
- "5432:5432"
volumes:

10
docker/environment.sh Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
export ASTEROID_STREAM_URL='http://ice.asteroid.radio'
# source this file prior to starting the asteroid containers. Set the
# DB name and access params here.
export ASTEROID_DB_NAME=asteroid
export ASTEROID_DB_USER=asteroid
export ASTEROID_DB_PASSWORD=asteroid_db_2025

View File

@ -1,5 +1,8 @@
#!/bin/bash
# source our environment for credentials
. environment.sh
# Simple start script for Docker directory
# Run from: /home/glenn/Projects/Code/asteroid/docker/