Postgres needs to own the ./data directory when running postgres docker-compose
Hello, As I was working with guacamole using the docker-compose files I found that there needs to be a postgres user that owns the ./data directory so postgres can write to the directory. Below is an updated README with the addition:
Guacamole-client
Guacamole-client is the superproject containing all Maven-based projects that make Apache Guacamole, an HTML5 web application that provides access to your desktop using remote desktop protocols.
Guacamole-client is used to build the subprojects that make up Guacamole, and to provide a common central repository. Each project contained here is completely independent of guacamole-client and can be built separately, though the others may have to be built first. If all projects are built using guacamole-client, Maven will take care of the proper build order.
Documentation:
http://guacamole.apache.org/ http://guacamole.apache.org/doc/gug/
Docker-Compose Local Deployment guide.
- Save
docker-compose-files/postgres-guacamole.yaml
ordocker-compose-files/mysql-guacamole.yaml
file asdocker-compose.yaml
in your preferred local directory. - Change directory where the
docker-compose.yaml
is saved. - Create folders named
init
,data
,record
, anddrive
.
mkdir ./init ./data ./record ./drive
- Make './init' folder executable.
chmod -R +x ./init
- If you are using
docker-compose-files/postgres-guacamole.yaml
, add a new operating system userpostgres
.
useradd postgres
- If you are using
docker-compose-files/postgres-guacamole.yaml
, change thedata
directory to be owned by thepostgres
user.
chown postgres:postgres ./data
- Initialize database.
If you are using
docker-compose-files/mysql-guacamole.yaml
, execute below.
docker run --rm registry1.dso.mil/ironbank/opensource/apache/guacamole/guacamole-client:latest /opt/guacamole/bin/initdb.sh --mysql > ./init/initdb.sql
If you are using docker-compose-files/postgres-guacamole.yaml
, execute below.
docker run --rm registry1.dso.mil/ironbank/opensource/apache/guacamole/guacamole-client:latest /opt/guacamole/bin/initdb.sh --postgres > ./init/initdb.sql
- Deploy Guacamole and preferred Database.
docker-compose up
- Wait for a little bit until guacamole server is up then open web browser then go to
http://localhost:8080/guacamole
. - Login (Username: guacadmin // Password: guacadmin)
Edited by Tom Hastings