diff --git a/cmd/fakermaker/docker-compose.yaml b/cmd/fakermaker/docker-compose.yaml new file mode 100644 index 00000000..06698307 --- /dev/null +++ b/cmd/fakermaker/docker-compose.yaml @@ -0,0 +1,125 @@ +version: '3' +volumes: + dbvol: + driver: local +services: + db: + image: postgres:14.3-alpine + restart: always + environment: + - POSTGRES_USER=bsky + - POSTGRES_PASSWORD=yksb + # intentionally *not* exposing default postgresql port to host (conflicts with other local dev DBs) + command: -p 6543 + ports: + - '6543:6543' + expose: + - '6543' + volumes: + - dbvol:/var/lib/postgresql/docker + - ./docker-create-dev-dbs.sql:/docker-entrypoint-initdb.d/create-dev-dbs.sql + healthcheck: + test: ["CMD-SHELL", "pg_isready -p 6543 -U bsky"] + interval: 3s + timeout: 2s + retries: 3 + + plc: + image: ghcr.io/bluesky-social/did-method-plc:plc-79cda64f2e51f0017c75e86b63afe95b100273c2 + ports: + - "2582:2582" + expose: + - "2582" + environment: + - ENV=dev + - DATABASE_URL=postgres://bsky:yksb@db:6543/plc_dev + - PORT=2582 + - DEBUG_MODE=1 + - LOG_ENABLED=true + - LOG_LEVEL=info + - LOG_DESTINATION=1 + working_dir: /app/packages/server + command: yarn run start + links: + - db + depends_on: + db: + condition: service_healthy + + pds-one: + image: ghcr.io/bluesky-social/atproto:pds-c18cb6a25d2d3bb7d1e8bc32f4c4aa617c5d73be + ports: + - "2583:2583" + expose: + - "2583" + environment: + - ENV=dev + - DB_POSTGRES_URL=postgres://bsky:yksb@db:6543/pds_dev + - AVAILABLE_USER_DOMAINS=.test,.dev.bsky.dev + - DID_PLC_URL=http://plc:2582 + - PORT=2583 + - DEBUG_MODE=1 + - LOG_LEVEL=info + - LOG_ENABLED=true + - LOG_DESTINATION=1 + working_dir: /app/packages/pds + command: yarn run start + links: + - db + - plc + depends_on: + db: + condition: service_healthy + plc: + condition: service_started + + bgs: + # to build/run locally, uncomment this instead + #build: ../bigsky/ + image: ghcr.io/bluesky-social/indigo:bigsky-8c8248dc2d2767532f545fc18c949608a6baf1df + ports: + - "2470:2470" + environment: + - ATP_PLC_HOST=http://plc:2582 + - ATP_PDS_HOST=http://pds-one:2583 + - GOLOG_LOG_LEVEL=info + links: + - db + - plc + - pds-one + depends_on: + db: + condition: service_healthy + plc: + condition: service_started + pds-one: + condition: service_started + + appview: + image: ghcr.io/bluesky-social/atproto:bsky-af9f11fbde332dfebb8c79e52f009cfd13d08346 + ports: + - "2584:2584" + expose: + - "2584" + environment: + - ENV=dev + - DB_POSTGRES_URL=postgres://bsky:yksb@db:6543/bsky_dev + - DID_PLC_URL=http://plc:2582 + - PORT=2584 + - DEBUG_MODE=1 + - LOG_LEVEL=info + - LOG_ENABLED=true + - LOG_DESTINATION=1 + working_dir: /app/packages/bsky + command: yarn run start + links: + - db + - plc + - bgs + depends_on: + db: + condition: service_healthy + plc: + condition: service_started + bgs: + condition: service_started diff --git a/cmd/fakermaker/docker-create-dev-dbs.sql b/cmd/fakermaker/docker-create-dev-dbs.sql new file mode 100644 index 00000000..148cc3e9 --- /dev/null +++ b/cmd/fakermaker/docker-create-dev-dbs.sql @@ -0,0 +1,5 @@ + +CREATE DATABASE plc_dev; +CREATE DATABASE pds_dev; +CREATE DATABASE bgs_dev; +CREATE DATABASE bsky_dev;