... And then we ask: How did this *ever* work??

(It did. On my machine.)
This commit is contained in:
Brian O'Reilly 2025-12-07 15:15:57 -05:00 committed by Brian O'Reilly
parent 6c6732d1e0
commit c9f6cb2aa7
3 changed files with 17 additions and 8 deletions

View File

@ -32,7 +32,7 @@ services:
- asteroid-network - asteroid-network
postgres: postgres:
image: postgres:16-alpine image: postgres:17-alpine
container_name: asteroid-postgres container_name: asteroid-postgres
environment: environment:
- POSTGRES_DB=${ASTEROID_DB_NAME:-asteroid} - POSTGRES_DB=${ASTEROID_DB_NAME:-asteroid}
@ -42,7 +42,7 @@ services:
- "5432:5432" - "5432:5432"
volumes: volumes:
- postgres-data:/var/lib/postgresql/data - postgres-data:/var/lib/postgresql/data
- ./init-db.sql:/docker-entrypoint-initdb.d/init-db.sql:ro # - ./init-db.sql:/docker-entrypoint-initdb.d/init-db.sql:ro
restart: unless-stopped restart: unless-stopped
networks: networks:
- asteroid-network - asteroid-network

View File

@ -82,14 +82,14 @@ CREATE INDEX idx_sessions_expires_at ON sessions(expires_at);
-- Create default admin user (password: admin - CHANGE THIS!) -- Create default admin user (password: admin - CHANGE THIS!)
-- Password hash for 'admin' using bcrypt -- Password hash for 'admin' using bcrypt
INSERT INTO users (username, email, password_hash, role, active) -- INSERT INTO users (username, email, password_hash, role, active)
VALUES ('admin', 'admin@asteroid.radio', '$2a$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewY5GyYqYqYqYqYq', 'admin', true) -- VALUES ('admin', 'admin@asteroid.radio', '$2a$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewY5GyYqYqYqYqYq', 'admin', true)
ON CONFLICT (username) DO NOTHING; -- ON CONFLICT (username) DO NOTHING;
-- Create a test listener user -- Create a test listener user
INSERT INTO users (username, email, password_hash, role, active) -- INSERT INTO users (username, email, password_hash, role, active)
VALUES ('listener', 'listener@asteroid.radio', '$2a$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewY5GyYqYqYqYqYq', 'listener', true) -- VALUES ('listener', 'listener@asteroid.radio', '$2a$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewY5GyYqYqYqYqYq', 'listener', true)
ON CONFLICT (username) DO NOTHING; -- ON CONFLICT (username) DO NOTHING;
-- Grant necessary permissions -- Grant necessary permissions
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO asteroid; GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO asteroid;

View File

@ -8,5 +8,14 @@ echo "🛑 Stopping Asteroid Radio Docker Services..."
# Stop services # Stop services
docker compose down docker compose down
# if we really need to clean everything and start fresh, run the
# following commands:
# docker compose down postgres
# docker volume rm docker_postgres-data
# TODO - apply a getopt interface to this script.
echo "" echo ""
echo "✅ Services stopped." echo "✅ Services stopped."