-
Notifications
You must be signed in to change notification settings - Fork 724
Expand file tree
/
Copy pathdocker-compose.upgrade.yml
More file actions
38 lines (37 loc) · 1.32 KB
/
docker-compose.upgrade.yml
File metadata and controls
38 lines (37 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Upgrade overlay — one-shot database upgrade service.
#
# Usage:
# # Preview changes (dry-run):
# docker compose -f docker-compose.yml -f docker-compose.postgres.yml -f docker-compose.upgrade.yml run --rm upgrade --dry-run
#
# # Apply upgrade:
# docker compose -f docker-compose.yml -f docker-compose.postgres.yml -f docker-compose.upgrade.yml run --rm upgrade
#
# # Check status:
# docker compose -f docker-compose.yml -f docker-compose.postgres.yml -f docker-compose.upgrade.yml run --rm upgrade --status
#
# The upgrade service runs goclaw upgrade and exits. Use --rm to auto-remove the container.
services:
upgrade:
image: ghcr.io/nextlevelbuilder/goclaw:latest
build:
context: ${GOCLAW_DIR:-.}
dockerfile: Dockerfile
args:
ENABLE_OTEL: "false"
env_file:
- path: .env
required: false
environment:
- GOCLAW_POSTGRES_DSN=postgres://${POSTGRES_USER:-goclaw}:${POSTGRES_PASSWORD:-goclaw}@postgres:5432/${POSTGRES_DB:-goclaw}?sslmode=disable
- GOCLAW_CONFIG=/app/data/config.json
- GOCLAW_MIGRATIONS_DIR=/app/migrations
- GOCLAW_ENCRYPTION_KEY=${GOCLAW_ENCRYPTION_KEY:-}
volumes:
- goclaw-data:/app/data
depends_on:
postgres:
condition: service_healthy
entrypoint: ["/app/goclaw"]
command: ["upgrade"]
restart: "no"