atproto Docker & Self-Hosted Deployment

GitHub

Social networking technology created by Bluesky

9,709 stars TypeScript TypeScript 1 file ยท ~65,635 tokens
RAW Compose
1. Pull Image (DOCKERHUB) docker pull library/postgres
2. Docker Run (1-Click Launch) docker run -d --name atproto -p 5433:5433 --restart always postgres:14.4-alpine
3. Podman Run podman run -d --name atproto -p 5433:5433 --restart always postgres:14.4-alpine
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/library/postgres:14.4-alpine
5. ORAS Pull (OCI Artifact) oras pull postgres:14.4-alpine
6. Compose Deployment docker compose up -d
packages/dev-infra/docker-compose.yaml
Download .yml
services:
  # An ephermerally-stored postgres database for single-use test runs
  db_test: &db_test
    image: postgres:14.4-alpine
    # We allow lots of connections to allow fast running computers to run
    # tests in parallel without running into connection limits.
    command: -c 'max_connections=1000'
    environment:
      - POSTGRES_USER=pg
      - POSTGRES_PASSWORD=password
    ports:
      - '5433:5432'
    # Healthcheck ensures db is queryable when `docker-compose up --wait` completes
    healthcheck:
      test: 'pg_isready -U pg'
      interval: 500ms
      timeout: 10s
      retries: 20
  # A persistently-stored postgres database
  db:
    <<: *db_test
    ports:
      - '5432:5432'
    healthcheck:
      disable: true
    volumes:
      - atp_db:/var/lib/postgresql/data
  # An ephermerally-stored redis cache for single-use test runs
  redis_test: &redis_test
    image: redis:7.0-alpine
    ports:
      - '6380:6379'
    # Healthcheck ensures redis is queryable when `docker-compose up --wait` completes
    healthcheck:
      test: ['CMD-SHELL', '[ "$$(redis-cli ping)" = "PONG" ]']
      interval: 500ms
      timeout: 10s
      retries: 20
  # A persistently-stored redis cache
  redis:
    <<: *redis_test
    command: redis-server --save 60 1 --loglevel warning
    ports:
      - '6379:6379'
    healthcheck:
      disable: true
    volumes:
      - atp_redis:/data
volumes:
  atp_db:
  atp_redis: