Your music, beautifully tracked. All yours. (coming soon)
teal.fm
teal-fm
atproto
1# Use the official Bun image as base
2FROM oven/bun:1.0 AS builder
3
4# Set working directory
5WORKDIR /app
6
7# Copy root workspace files
8COPY package.json bun.lockb ./
9
10# Copy turbo.json
11COPY turbo.json ./
12
13# Copy workspace packages
14COPY packages/db/ ./packages/db/
15COPY packages/lexicons/ ./packages/lexicons/
16COPY packages/tsconfig/ ./packages/tsconfig/
17
18# Copy the aqua app
19COPY apps/aqua/ ./apps/aqua/
20
21# Install dependencies
22RUN bun install
23
24# Build workspace packages (if needed)
25RUN bun run build --filter=@teal/db
26RUN bun run build --filter=@teal/lexicons
27
28# Build the aqua app
29WORKDIR /app/apps/aqua
30RUN bun run build
31
32# Start production image (node lts ideally)
33FROM node:bookworm-slim
34
35WORKDIR /app
36
37# Copy built assets from builder
38COPY --from=builder /app/apps/aqua/dist ./dist
39# copy base node modules
40COPY --from=builder /app/node_modules ./node_modules
41COPY --from=builder /app/apps/aqua/node_modules ./node_modules
42COPY --from=builder /app/apps/aqua/package.json ./
43
44# move public to cwd
45RUN mv ./dist/public ./public
46
47# Set environment variables
48ENV NODE_ENV=production
49
50# Expose the port your app runs on
51EXPOSE 3000
52
53# Start the application
54CMD ["npm", "run", "start"]