Something went wrong. Try again.
An atproto indexer and web app that scrapes domains from collections it sees
Something went wrong. Try again.
at-tracker local.sh
123456789101112131415161718192021222324252627282930313233343536373839#!/usr/bin/env bash# Run the app locally using Docker Compose.# Starts postgres + app (no Caddy) and exposes the app at http://localhost:3000## Usage:# ./local.sh # build image and start# ./local.sh --no-build # skip rebuild (use cached image)# ./local.sh down # stop and remove containers
set -euo pipefail
ENV_FILE=".env.local"COMPOSE_FILES="-f docker-compose.yml -f docker-compose.dev.yml"
if [[ "${1:-}" == "down" ]]; then docker compose $COMPOSE_FILES --env-file "$ENV_FILE" down echo "Stopped." exit 0fi
# Create .env.local from the example if it doesn't exist yetif [[ ! -f "$ENV_FILE" ]]; then cp .env.example "$ENV_FILE" # Point at the locally built image instead of DockerHub sed -i 's|^DOCKER_IMAGE=.*|DOCKER_IMAGE=at-tracker:local|' "$ENV_FILE" echo "Created $ENV_FILE — review it before continuing." echo " (DOCKER_IMAGE is already set to at-tracker:local for local builds)" echo ""fi
# Build the image unless --no-build was passedif [[ "${1:-}" != "--no-build" ]]; then echo "Building image..." docker build -t at-tracker:local .fi
echo "Starting postgres + app (http://localhost:3000)..."docker compose $COMPOSE_FILES --env-file "$ENV_FILE" up postgres app