| name | manage-b24-environment |
| description | Manage the Bitrix24 development environment using Docker, Makefile, and Cloudpub. Use this skill when you need to start/stop services, check logs, fix tunnel issues, or manage the database. |
Manage Bitrix24 Environment
Quick Start
The project uses Docker Compose and Makefiles to manage the development environment.
Common Commands
make dev-php
make dev-python
make dev-node
make down
make logs
docker logs api
docker logs frontend
docker compose restart api
docker compose restart frontend
Environment Setup
- Initial Setup: Run
make dev-init to interactively set up the project (select backend, configure .env, setup Cloudpub).
- Configuration: All configuration is in
.env.
CLOUDPUB_TOKEN: Required for public URL (get from cloudpub.ru).
CLIENT_ID / CLIENT_SECRET: Bitrix24 application credentials.
SERVER_HOST: Backend URL (e.g., http://api-php:8000).
Cloudpub & Tunnels
The project uses Cloudpub to expose the local environment to Bitrix24.
- Public URL: Found in
docker logs cloudpubFront or .env (VIRTUAL_HOST).
- Troubleshooting:
- If the tunnel is not working, check
CLOUDPUB_TOKEN in .env.
- On macOS (ARM64), ensure
platform: linux/amd64 is set for the cloudpub service in docker-compose.yml.
Database Management
- PHP: Run
make dev-php-init-database to apply migrations.
- Python/Node: Database is initialized automatically on first run.
- Access:
- PostgreSQL/MySQL runs in the
database container.
- Credentials in
.env (DB_USER, DB_PASSWORD, DB_NAME).
Troubleshooting
- "Cloudpub not starting": Check token validity and architecture (amd64 vs arm64).
- "Frontend not connecting": Check
SERVER_HOST matches the running backend.
- "JWT Error": Ensure
JWT_SECRET is set and matches between services (if applicable).