Your music, beautifully tracked. All yours. (coming soon) teal.fm
teal-fm atproto

wip

+55 -21
+9
.env.template
··· 1 + NODE_ENV=development 2 + PORT=3000 3 + HOST=localhost 4 + PUBLIC_URL= 5 + DB_USER= 6 + DID_WEB_PUBKEY= 7 + DB_PASSWORD= 8 + DB_NAME= 9 + DATABASE_URL="postgresql://${DB_USER}:${DB_PASSWORD}@localhost:5432/${DB_NAME}"
+1
.gitignore
··· 46 46 **/*.log 47 47 package-lock.json 48 48 **/*.bun 49 + .idea
+3 -3
apps/aqua/Dockerfile
··· 5 5 WORKDIR /app 6 6 7 7 # Copy root workspace files 8 - COPY package.json bun.lockb ./ 8 + COPY package.json ./ 9 9 10 10 # Copy turbo.json 11 11 COPY turbo.json ./ ··· 22 22 RUN bun install 23 23 24 24 # Build workspace packages (if needed) 25 - RUN bun run build --filter=@teal/db 26 - RUN bun run build --filter=@teal/lexicons 25 + RUN bun run build --filter=@teal/db --filter !@teal/amethyst 26 + RUN bun run build --filter=@teal/lexicons --filter !@teal/amethyst 27 27 28 28 # Build the aqua app 29 29 WORKDIR /app/apps/aqua
+1 -1
apps/aqua/src/index.ts
··· 84 84 logger.info( 85 85 `Listening on ${ 86 86 info.address == '::1' 87 - ? 'http://0.0.0.0' 87 + ? `http://${env.HOST}` 88 88 : // TODO: below should probably be https:// 89 89 // but i just want to ctrl click in the terminal 90 90 'http://' + info.address
+17 -15
compose.dev.yml
··· 10 10 - app_network 11 11 depends_on: 12 12 - postgres 13 - - redis 14 13 env_file: 15 14 - .env 15 + postgres: 16 + image: postgres:latest 17 + container_name: postgres_db 18 + environment: 19 + POSTGRES_USER: ${DB_USER} 20 + POSTGRES_PASSWORD: ${DB_PASSWORD} 21 + POSTGRES_DB: ${DB_NAME} 22 + ports: 23 + - "5432:5432" 24 + volumes: 25 + - postgres_data:/var/lib/postgresql/data 26 + extra_hosts: 27 + - "host.docker.internal:host-gateway" 28 + networks: 29 + - app_network 30 + env_file: .env 16 31 # traefik: 17 32 # image: traefik:v2.10 18 33 # container_name: traefik ··· 31 46 # extra_hosts: 32 47 # - "host.docker.internal:host-gateway" # This allows reaching host machine 33 48 34 - # postgres: 35 - # image: postgres:latest 36 - # container_name: postgres_db 37 - # environment: 38 - # POSTGRES_USER: postgres 39 - # POSTGRES_PASSWORD: yourpassword 40 - # POSTGRES_DB: yourdatabase 41 - # ports: 42 - # - "5432:5432" 43 - # volumes: 44 - # - postgres_data:/var/lib/postgresql/data 45 - # networks: 46 - # - app_network 47 49 48 50 # redis: 49 51 # image: redis:latest ··· 62 64 63 65 volumes: 64 66 postgres_data: 65 - redis_data: 67 + # redis_data:
+2 -1
package.json
··· 9 9 "typecheck": "pnpm -r exec tsc --noEmit", 10 10 "fix": "biome lint --apply . && biome format --write . && biome check . --apply", 11 11 "nuke": "rimraf node_modules */*/node_modules", 12 - "lex:gen-server": "turbo lex:gen-server" 12 + "lex:gen-server": "turbo lex:gen-server", 13 + "db:migrate": "cd ./packages/db && drizzle-kit migrate" 13 14 }, 14 15 "dependencies": { 15 16 "@atproto/oauth-client": "^0.3.8"
+9
packages/db/drizzle.config.ts
··· 1 1 import { defineConfig } from "drizzle-kit"; 2 + import dotenv from "dotenv"; 3 + import dotenvExpand from "dotenv-expand"; 4 + 5 + //Loads from root .env 6 + dotenvExpand.expand(dotenv.config({ path: '../../.env' })); 7 + //Or can be overridden by .env in the current folder 8 + dotenvExpand.expand(dotenv.config()); 9 + 10 + 2 11 3 12 export default defineConfig({ 4 13 dialect: "postgresql",
+2 -1
packages/db/package.json
··· 18 18 "postgres": "^3.4.5" 19 19 }, 20 20 "devDependencies": { 21 - "@types/node": "^20.17.6" 21 + "@types/node": "^20.17.6", 22 + "dotenv-expand": "^12.0.2" 22 23 } 23 24 }
+11
pnpm-lock.yaml
··· 336 336 '@types/node': 337 337 specifier: ^20.17.6 338 338 version: 20.17.14 339 + dotenv-expand: 340 + specifier: ^12.0.2 341 + version: 12.0.2 339 342 340 343 packages/lexicons: 341 344 dependencies: ··· 3686 3689 3687 3690 dotenv-expand@11.0.7: 3688 3691 resolution: {integrity: sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==} 3692 + engines: {node: '>=12'} 3693 + 3694 + dotenv-expand@12.0.2: 3695 + resolution: {integrity: sha512-lXpXz2ZE1cea1gL4sz2Ipj8y4PiVjytYr3Ij0SWoms1PGxIv7m2CRKuRuCRtHdVuvM/hNJPMxt5PbhboNC4dPQ==} 3689 3696 engines: {node: '>=12'} 3690 3697 3691 3698 dotenv@16.4.7: ··· 11013 11020 domhandler: 5.0.3 11014 11021 11015 11022 dotenv-expand@11.0.7: 11023 + dependencies: 11024 + dotenv: 16.4.7 11025 + 11026 + dotenv-expand@12.0.2: 11016 11027 dependencies: 11017 11028 dotenv: 16.4.7 11018 11029