forked from yndx-yavshoke/server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (24 loc) · 684 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (24 loc) · 684 Bytes
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
FROM oven/bun:1 as base
WORKDIR /usr/src/app
# Install system dependencies
RUN apt-get update && apt-get install -y \
postgresql-client \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy package.json
COPY package.json ./
# Install dependencies
RUN bun install
# Copy source code
COPY . .
# Copy experiments.json (will be overridden by volume mount in production)
COPY experiments.json ./
# Expose port
EXPOSE 3000
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:3000/health || exit 1
# Start script that waits for DB and runs migrations
COPY start.sh ./
RUN chmod +x start.sh
CMD ["./start.sh"]