mirror of
https://github.com/jwetzell/docker-guacamole.git
synced 2026-08-21 15:09:12 +00:00
first commit
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
postgresql-hostname: localhost
|
||||
postgresql-port: 5432
|
||||
postgresql-database: guacamole_db
|
||||
postgresql-username: guacamole
|
||||
postgresql-password: null
|
||||
|
||||
enable-clipboard-integration: true
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/with-contenv sh
|
||||
|
||||
cp -rn /app/guacamole /config
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/with-contenv sh
|
||||
|
||||
mkdir -p /config/postgres
|
||||
chown postgres:postgres /config/postgres
|
||||
chmod 0700 /config/postgres
|
||||
|
||||
if [ -e /config/postgres/postgresql.conf ]; then
|
||||
echo "Database already configured"
|
||||
else
|
||||
s6-setuidgid postgres initdb
|
||||
fi
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/with-contenv sh
|
||||
|
||||
until pg_isready; do
|
||||
echo "Waiting for postgres to come up..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Create database if it does not exist
|
||||
psql -U postgres -lqt | cut -d \| -f 1 | grep -qw $POSTGRES_DB
|
||||
if [ $? -ne 0 ]; then
|
||||
createuser -U postgres $POSTGRES_USER
|
||||
createdb -U postgres -O $POSTGRES_USER $POSTGRES_DB
|
||||
cat /app/guacamole/schema/*.sql | psql -U $POSTGRES_USER -d $POSTGRES_DB -f -
|
||||
fi
|
||||
|
||||
echo "Starting guacamole client..."
|
||||
s6-setuidgid root catalina.sh run
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/with-contenv sh
|
||||
|
||||
echo "Starting guacamole guacd..."
|
||||
s6-setuidgid root guacd -f
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/with-contenv sh
|
||||
|
||||
echo "Starting postgres..."
|
||||
s6-setuidgid postgres postgres
|
||||
Reference in New Issue
Block a user