... And then we ask: How did this *ever* work??
(It did. On my machine.)
This commit is contained in:
parent
6c6732d1e0
commit
c9f6cb2aa7
|
|
@ -32,7 +32,7 @@ services:
|
|||
- asteroid-network
|
||||
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
image: postgres:17-alpine
|
||||
container_name: asteroid-postgres
|
||||
environment:
|
||||
- POSTGRES_DB=${ASTEROID_DB_NAME:-asteroid}
|
||||
|
|
@ -42,7 +42,7 @@ services:
|
|||
- "5432:5432"
|
||||
volumes:
|
||||
- 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
|
||||
networks:
|
||||
- asteroid-network
|
||||
|
|
|
|||
|
|
@ -82,14 +82,14 @@ CREATE INDEX idx_sessions_expires_at ON sessions(expires_at);
|
|||
|
||||
-- Create default admin user (password: admin - CHANGE THIS!)
|
||||
-- Password hash for 'admin' using bcrypt
|
||||
INSERT INTO users (username, email, password_hash, role, active)
|
||||
VALUES ('admin', 'admin@asteroid.radio', '$2a$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewY5GyYqYqYqYqYq', 'admin', true)
|
||||
ON CONFLICT (username) DO NOTHING;
|
||||
-- INSERT INTO users (username, email, password_hash, role, active)
|
||||
-- VALUES ('admin', 'admin@asteroid.radio', '$2a$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewY5GyYqYqYqYqYq', 'admin', true)
|
||||
-- ON CONFLICT (username) DO NOTHING;
|
||||
|
||||
-- Create a test listener user
|
||||
INSERT INTO users (username, email, password_hash, role, active)
|
||||
VALUES ('listener', 'listener@asteroid.radio', '$2a$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewY5GyYqYqYqYqYq', 'listener', true)
|
||||
ON CONFLICT (username) DO NOTHING;
|
||||
-- INSERT INTO users (username, email, password_hash, role, active)
|
||||
-- VALUES ('listener', 'listener@asteroid.radio', '$2a$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewY5GyYqYqYqYqYq', 'listener', true)
|
||||
-- ON CONFLICT (username) DO NOTHING;
|
||||
|
||||
-- Grant necessary permissions
|
||||
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO asteroid;
|
||||
|
|
|
|||
|
|
@ -8,5 +8,14 @@ echo "🛑 Stopping Asteroid Radio Docker Services..."
|
|||
# Stop services
|
||||
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 "✅ Services stopped."
|
||||
|
|
|
|||
Loading…
Reference in New Issue