ci: include db deployment script

This commit is contained in:
Giles Bradshaw 2020-08-11 13:17:35 +01:00
parent 2b50ba9c66
commit a60a7f5955
3 changed files with 13 additions and 2 deletions

View File

@ -8,6 +8,15 @@
* local-docker-registry
* registry-password
## initial deployment
initialise database
```shell
docker ps | grep guacamole-postgresql.1
sh init-postgresql.sh $ID
```
## using ssh keys
guacamole does *not* work with the standard openssh format for private keys. ie:

View File

@ -1,4 +1,4 @@
docker stack rm remote
docker stack rm guacamole
echo 'sleeping...zzz'
sleep 60
docker stack deploy -c docker-compose.yml remote
docker stack deploy -c docker-compose.yml guacamole

2
init-postgresql.sql Normal file
View File

@ -0,0 +1,2 @@
docker exec -it $1 psql -U postgres -d $GUACAMOLE_POSTGRES_DB -f /initdb.sql
docker exec -it $1 psql -U postgres -d $GUACAMOLE_POSTGRES_DB -f /init-user.sql -v password=$GUACAMOLE_POSTGRES_PASSWORD -v user=$GUACAMOLE_POSTGRES_USER