diff --git a/compose.yaml b/compose.yaml index f033897..3457a59 100644 --- a/compose.yaml +++ b/compose.yaml @@ -66,6 +66,20 @@ services: condition: service_completed_successfully restart: unless-stopped + tools: + profiles: [tools] + build: + dockerfile_inline: | + FROM docker:27.3.1-cli + RUN apk add --no-cache python3 make + WORKDIR /work + image: mtusi-messenger-lab2-tools:dev + environment: + BASE_URL: http://api:8080 + volumes: + - .:/work + - /var/run/docker.sock:/var/run/docker.sock + volumes: pgdata: secrets: diff --git a/scripts/restart.sh b/scripts/restart.sh new file mode 100755 index 0000000..7e2fc28 --- /dev/null +++ b/scripts/restart.sh @@ -0,0 +1,9 @@ +#!/bin/sh +set -eu +cd "$(dirname "$0")/.." +started() { + docker inspect -f '{{.Name}} {{.State.Status}} started={{.State.StartedAt}}' $(docker compose ps -q postgres api) +} +started +docker compose restart postgres api +started