Skip to content

Instantly share code, notes, and snippets.

@sandromello
Last active May 23, 2024 15:38
Show Gist options
  • Save sandromello/5a7055cfcf9ed79a501aa3d829d874b4 to your computer and use it in GitHub Desktop.
Save sandromello/5a7055cfcf9ed79a501aa3d829d874b4 to your computer and use it in GitHub Desktop.
Hoop VM installation

Create database and permissions

CREATE DATABASE hoopdb;
CREATE USER hoopuser WITH ENCRYPTED PASSWORD 'my-secure-password' CREATEROLE;
-- switch to the created database
\c hoopdb
GRANT ALL PRIVILEGES ON DATABASE hoopdb TO hoopuser;
GRANT ALL PRIVILEGES ON SCHEMA public to hoopuser;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO hoopuser;

Run in Docker

cat - > .env <<EOF
LOG_LEVEL=INFO
LOG_ENCODING=json
GRPC_URL=http://<public-ip>:8010
POSTGRES_DB_URI=postgres://<user>:<pwd>@<postgres-host>:<port>/hoopdb

# auth configuration / azure
# https://hoop.dev/docs/sso/azure
API_URL=https://...
IDP_CLIENT_ID=<client-id>
IDP_CLIENT_SECRET=<client-secret>
IDP_ISSUER=https://login.microsoftonline.com/{tenant_id}/v2.0
IDP_AUDIENCE=<clientid>/.default
EOF

docker run --rm --name hoopdev \
  -p 8009:8009 \
  -p 8010:8010 \
  --env-file=.env \
  --cap-add=NET_ADMIN \
  -it hoophq/hoop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment