mirror of
https://github.com/weslambert/velociraptor-docker.git
synced 2025-09-25 21:21:14 +00:00
Update to use .env
This commit is contained in:
@@ -8,6 +8,10 @@ services:
|
|||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- ./velociraptor:/velociraptor/:rw
|
- ./velociraptor:/velociraptor/:rw
|
||||||
|
environment:
|
||||||
|
- VELOX_USER=${VELOX_USER}
|
||||||
|
- VELOX_PASSWORD=${VELOX_PASSWORD}
|
||||||
|
- VELOX_ROLE=${VELOX_ROLE}
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
- "8001:8001"
|
- "8001:8001"
|
||||||
|
@@ -1,12 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
#VERSION="0.4.5"
|
#VERSION="0.4.5"
|
||||||
BIND_ADDRESS="0.0.0.0"
|
BIND_ADDRESS="0.0.0.0"
|
||||||
PUBLIC_PATH="public"
|
PUBLIC_PATH="public"
|
||||||
LOG_DIR="."
|
LOG_DIR="."
|
||||||
SERVER_URL="https://VelociraptorServer:8000/"
|
SERVER_URL="https://VelociraptorServer:8000/"
|
||||||
USER="admin"
|
|
||||||
PASSWORD="admin"
|
|
||||||
ROLE="administrator"
|
|
||||||
DATASTORE_LOCATION="./"
|
DATASTORE_LOCATION="./"
|
||||||
FILESTORE_DIRECTORY="./"
|
FILESTORE_DIRECTORY="./"
|
||||||
CLIENT_DIR="/velociraptor/clients"
|
CLIENT_DIR="/velociraptor/clients"
|
||||||
@@ -22,7 +20,7 @@ if [ ! -f server.config.yaml ]; then
|
|||||||
./velociraptor config generate > server.config.yaml --merge '{"Frontend":{"public_path":"'$PUBLIC_PATH'"},"API":{"bind_address":"'$BIND_ADDRESS'"},"GUI":{"bind_address":"'$BIND_ADDRESS'"},"Monitoring":{"bind_address":"'$BIND_ADDRESS'"},"Logging":{"output_directory":"'$LOG_DIR'","separate_logs_per_component":true},"Client":{"server_urls":["'$SERVER_URL'"],"use_self_signed_ssl":true}, "Datastore":{"location":"'$DATASTORE_LOCATION'", "filestore_directory":"'$FILESTORE_DIRECTORY'"}}'
|
./velociraptor config generate > server.config.yaml --merge '{"Frontend":{"public_path":"'$PUBLIC_PATH'"},"API":{"bind_address":"'$BIND_ADDRESS'"},"GUI":{"bind_address":"'$BIND_ADDRESS'"},"Monitoring":{"bind_address":"'$BIND_ADDRESS'"},"Logging":{"output_directory":"'$LOG_DIR'","separate_logs_per_component":true},"Client":{"server_urls":["'$SERVER_URL'"],"use_self_signed_ssl":true}, "Datastore":{"location":"'$DATASTORE_LOCATION'", "filestore_directory":"'$FILESTORE_DIRECTORY'"}}'
|
||||||
sed -i "s#https://localhost:8000/#$SERVER_URL#" server.config.yaml
|
sed -i "s#https://localhost:8000/#$SERVER_URL#" server.config.yaml
|
||||||
sed -i 's#/tmp/velociraptor#.#'g server.config.yaml
|
sed -i 's#/tmp/velociraptor#.#'g server.config.yaml
|
||||||
./velociraptor --config server.config.yaml user add $USER $PASSWORD --role $ROLE
|
./velociraptor --config server.config.yaml user add $VELOX_USER $VELOX_PASSWORD --role $VELOX_ROLE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Re-generate client config in case server config changed
|
# Re-generate client config in case server config changed
|
||||||
|
Reference in New Issue
Block a user