Commands
In docker we mainly wrap Bublik internal commands and provide multiple shortcuts
List Of All Commands
You can get list of all commands via running:
task
Summary
To get description of any command you can run with --summary
flag:
task backup:create --summary
Managing Containers
Create & Remove
- To create and start containers run:
task up
- Opposite of
up
isdown
. This will also remove Containers
task down
Start & Stop
- To start stopped containers you can run:
task start
- To stop containers you can run:
task stop
Update
To update to latest version you should run two commands:
# To pull latest images
# This will pull images depending based on IMAGE_TAG from .env
# You can also pin IMAGE_TAG to some version
task pull
# Once images pulled recreate containers
task up
Import & Publish
Import & Publish Log Archives
- Publish & Import Local Logs from
incoming
directory:
task publish
- Publish & Import Single Log:
# Publish and import single log archive
task import -- ~/net.tar
Import Log From URL
- Import via API call with
curl
:
task import-remote -- <log_url>
- Import via shell from container:
task import-command -- <log_url>
Docker Containers
When you set up Bublik, you'll have multiple running containers.
To manage these containers effectively, you can use the following commands:
Viewing Running Containers
To get a list of all running containers:
docker ps
This command displays all active containers along with information such as their CONTAINER ID
, image
, status
, ports
, and names
.
Accessing Container Shells
To access a shell inside a specific container:
- First locate the container's ID from the
CONTAINER ID
column in the docker ps output - Then run
docker exec -it <container_id> bash
This command opens an interactive terminal session within the specified container, allowing you to execute commands directly inside it.
Some containers might use a different shell than bash
. If the above command doesn't work, try using sh
instead:
docker exec -it <container_id> sh
For convenience, we provide shortcut to get terminal session inside django container (see below)
Shell Access
If you can't specify management command or you know what you are doing you can get a shell inside container to run different commands
This will drop you into django container shell.
task shell
Now you can run different commands:
# To trigger meta meta categorization
python manage.py meta_categorization
# To delete run
python manage.py delete_run
We also offer some shortcuts
Management
Delete Run
To delete some run you can run:
task delete-run -- <run_id>
Meta Categorization
To trigger meta categorization you can run:
task meta-categorization
Backup
- To create backup of db and logs you can run:
task backup:create
- To get list of available backup run:
task backup:list
- To restore from backup you can run:
task backup:restore -- backups/<your_backup_file>