-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.api
More file actions
41 lines (33 loc) · 1.06 KB
/
Dockerfile.api
File metadata and controls
41 lines (33 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# ------------------------------
# 1. Base image (Bun official)
# ------------------------------
FROM oven/bun:1
# ------------------------------
# 2. Set working directory
# ------------------------------
WORKDIR /app
# ------------------------------
# 3. Copy entire monorepo
# ------------------------------
COPY . .
# ------------------------------
# 4. Move into API folder
# ------------------------------
WORKDIR /app/apps/api
# ------------------------------
# 5. Install API dependencies
# ------------------------------
RUN bun install
# ------------------------------
# 6. Cloud Run expects the server
# to listen on 0.0.0.0:$PORT
# ------------------------------
ENV PORT=8080
ENV DATABASE_URL=postgresql://neondb_owner:npg_IcfqaS62BRgY@ep-divine-fire-a129v6xb-pooler.ap-southeast-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require
ENV JWT_SECRET=Gungun@2005
# (Cloud Run sets PORT at runtime automatically: 8080, 8081 etc.)
EXPOSE 8080
# ------------------------------
# 7. Start API server
# ------------------------------
CMD ["bun", "index.ts"]