feat: CI/CD pipeline setup complete - Ansible playbooks updated, secrets configured, workflow ready
This commit is contained in:
16
docker/portainer/init-admin.sh
Normal file
16
docker/portainer/init-admin.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
# Portainer Admin Password Init Script
|
||||
# Creates bcrypt hash of admin password for Portainer
|
||||
|
||||
if [ -z "$PORTAINER_ADMIN_PASSWORD" ]; then
|
||||
echo "Error: PORTAINER_ADMIN_PASSWORD environment variable not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create bcrypt hash of password
|
||||
# Note: Portainer uses bcrypt cost 10
|
||||
apk add --no-cache apache2-utils
|
||||
htpasswd -nbB admin "$PORTAINER_ADMIN_PASSWORD" | cut -d ":" -f 2 > /tmp/portainer_password
|
||||
|
||||
echo "Portainer admin password hash created"
|
||||
cat /tmp/portainer_password
|
||||
Reference in New Issue
Block a user