A lexicon-driven AppView for ATProto. happyview.dev
backfill firehose jetstream atproto appview oauth lexicon
8
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: add custom Postgres image for Railway database init

Trezy aee96793 241c6081

+53 -30
+41
.github/workflows/docker-postgres.yml
··· 1 + name: Build and Publish Postgres Image 2 + 3 + on: 4 + push: 5 + branches: [main, dev] 6 + paths: 7 + - docker/Dockerfile.postgres 8 + - docker/init-databases.sh 9 + 10 + env: 11 + GHCR_POSTGRES_IMAGE: ghcr.io/${{ github.repository }}-postgres 12 + 13 + jobs: 14 + postgres: 15 + runs-on: ubuntu-latest 16 + permissions: 17 + contents: read 18 + packages: write 19 + steps: 20 + - name: Checkout repository 21 + uses: actions/checkout@v4 22 + 23 + - name: Set up Docker Buildx 24 + uses: docker/setup-buildx-action@v3 25 + 26 + - name: Log in to GitHub Container Registry 27 + uses: docker/login-action@v3 28 + with: 29 + registry: ghcr.io 30 + username: ${{ github.actor }} 31 + password: ${{ secrets.GITHUB_TOKEN }} 32 + 33 + - name: Build and push 34 + uses: docker/build-push-action@v5 35 + with: 36 + context: docker 37 + file: docker/Dockerfile.postgres 38 + push: true 39 + tags: ${{ env.GHCR_POSTGRES_IMAGE }}:latest 40 + cache-from: type=gha,scope=postgres 41 + cache-to: type=gha,scope=postgres,mode=max
+1 -1
.github/workflows/docker.yml
··· 9 9 ATCR_IMAGE: atcr.io/${{ secrets.ATCR_NAMESPACE }}/happyview 10 10 11 11 jobs: 12 - build: 12 + happyview: 13 13 runs-on: ubuntu-latest 14 14 permissions: 15 15 contents: read
+6 -25
docker-compose.yml
··· 16 16 timeout: 3s 17 17 retries: 5 18 18 19 - aip: 20 - image: atcr.io/gamesgamesgamesgames.games/aip:2.2.4-dev.1 21 - ports: 22 - - "8080:8080" 23 - dns: 24 - - 8.8.8.8 25 - - 8.8.4.4 26 - environment: 27 - DATABASE_URL: postgres://aip:aip@postgres/aip 28 - STORAGE_BACKEND: postgres 29 - # EXTERNAL_BASE: http://localhost:8080 30 - DPOP_NONCE_SEED: ${DPOP_NONCE_SEED} 31 - OAUTH_SIGNING_KEYS: ${OAUTH_SIGNING_KEYS} 32 - ATPROTO_OAUTH_SIGNING_KEYS: ${ATPROTO_OAUTH_SIGNING_KEYS} 33 - ENABLE_CLIENT_API: "true" 34 - PORT: 8080 35 - depends_on: 36 - postgres: 37 - condition: service_healthy 38 - 39 19 tap: 40 - image: ghcr.io/bluesky-social/indigo/tap:latest 20 + build: 21 + context: ../indigo 22 + dockerfile: cmd/tap/Dockerfile 23 + # image: ghcr.io/bluesky-social/indigo/tap:latest 41 24 ports: 42 25 - "2480:2480" 43 26 environment: ··· 64 47 - cargo-target:/app/target 65 48 environment: 66 49 DATABASE_URL: postgres://happyview:happyview@postgres/happyview 67 - AIP_URL: http://aip:8080 50 + AIP_URL: https://aip.gamesgamesgamesgames.games 68 51 TAP_URL: http://tap:2480 69 52 TAP_ADMIN_PASSWORD: ${TAP_ADMIN_PASSWORD} 70 53 RELAY_URL: https://relay1.us-east.bsky.network ··· 72 55 depends_on: 73 56 postgres: 74 57 condition: service_healthy 75 - aip: 76 - condition: service_started 77 58 tap: 78 59 condition: service_started 79 60 ··· 89 70 environment: 90 71 HOSTNAME: 0.0.0.0 91 72 API_URL: http://happyview:3000 92 - AIP_PROXY_URL: http://aip:8080 73 + AIP_PROXY_URL: https://aip.gamesgamesgamesgames.games 93 74 # NEXT_PUBLIC_AIP_URL: http://localhost:8080 94 75 95 76 volumes:
+2
docker/Dockerfile.postgres
··· 1 + FROM ghcr.io/railwayapp-templates/postgres-ssl:17 2 + COPY init-databases.sh /docker-entrypoint-initdb.d/
+3 -4
docker/init-databases.sh
··· 2 2 set -e 3 3 4 4 psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL 5 - CREATE USER aip WITH PASSWORD 'aip'; 6 - CREATE DATABASE aip OWNER aip; 7 - CREATE USER tap WITH PASSWORD 'tap'; 8 - CREATE DATABASE tap OWNER tap; 5 + CREATE DATABASE aip; 6 + CREATE DATABASE happyview; 7 + CREATE DATABASE tap; 9 8 EOSQL