76 lines
1.7 KiB
Markdown
76 lines
1.7 KiB
Markdown
# Docker
|
|
|
|
## Local Dev (Compose)
|
|
|
|
```bash
|
|
docker compose up -d --build
|
|
docker compose ps
|
|
docker compose down -v
|
|
```
|
|
|
|
To include the observability stack (Grafana/Loki/Tempo/VictoriaMetrics) with the local compose:
|
|
|
|
```bash
|
|
docker compose -f docker-compose.yml -f observability/docker-compose.yml up -d --build
|
|
docker compose -f docker-compose.yml -f observability/docker-compose.yml down -v
|
|
```
|
|
|
|
Service ports in the default compose:
|
|
- Gateway HTTP: `http://localhost:8080`
|
|
- Gateway gRPC: `localhost:8081`
|
|
- Aggregate gRPC: `localhost:50051`
|
|
- Aggregate HTTP: `http://localhost:18080`
|
|
- Runner HTTP: `http://localhost:28080`
|
|
- Control API: `http://localhost:38080`
|
|
- Control UI: `http://localhost:8082`
|
|
- NATS: `nats://localhost:4222`, monitoring `http://localhost:8222`
|
|
|
|
## Swarm (Dev)
|
|
|
|
Build images:
|
|
|
|
```bash
|
|
sh docker/scripts/build_images.sh all
|
|
```
|
|
|
|
Build images for the Gitea container registry:
|
|
|
|
```bash
|
|
export IMAGE_PREFIX=git.madapes.com/madapes/cloudlysis
|
|
export IMAGE_TAG=dev
|
|
sh docker/scripts/build_images.sh all
|
|
```
|
|
|
|
Push images to the Gitea container registry:
|
|
|
|
```bash
|
|
docker login git.madapes.com
|
|
export IMAGE_PREFIX=git.madapes.com/madapes/cloudlysis
|
|
export IMAGE_TAG=dev
|
|
sh docker/scripts/push_images.sh all
|
|
```
|
|
|
|
Create dev secrets required by the observability stack:
|
|
|
|
```bash
|
|
sh docker/scripts/swarm_dev_secrets.sh
|
|
```
|
|
|
|
Deploy:
|
|
|
|
```bash
|
|
export IMAGE_PREFIX=cloudlysis
|
|
export IMAGE_TAG=dev
|
|
docker stack deploy -c swarm/stacks/platform.yml cloudlysis
|
|
docker stack deploy -c swarm/stacks/control-plane.yml cloudlysis_control
|
|
docker stack deploy -c swarm/stacks/observability.yml cloudlysis_obs
|
|
```
|
|
|
|
Remove:
|
|
|
|
```bash
|
|
docker stack rm cloudlysis_obs
|
|
docker stack rm cloudlysis_control
|
|
docker stack rm cloudlysis
|
|
```
|