27c62fa54c
- Contexte de build depuis la racine du workspace Cargo - Rust 1.86 pour edition 2024 - Layer cache avec stubs membres du workspace - Création répertoire /data dans l'image - SQLite create_if_missing(true) pour créer la DB au premier démarrage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
33 lines
696 B
YAML
33 lines
696 B
YAML
services:
|
|
backend:
|
|
build:
|
|
context: .
|
|
dockerfile: backend/Dockerfile
|
|
image: sentinelmesh-backend:latest
|
|
container_name: sentinelmesh-backend
|
|
ports:
|
|
- "8080:8080"
|
|
volumes:
|
|
- sentinelmesh-data:/data
|
|
environment:
|
|
DATABASE_URL: sqlite:///data/sentinelmesh.sqlite
|
|
LISTEN_ADDR: 0.0.0.0:8080
|
|
RUST_LOG: info
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:8080/api/v1/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
networks:
|
|
- sentinelmesh
|
|
|
|
networks:
|
|
sentinelmesh:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
sentinelmesh-data:
|
|
driver: local
|