-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (33 loc) · 1001 Bytes
/
Dockerfile
File metadata and controls
44 lines (33 loc) · 1001 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
34
35
36
37
38
39
40
41
42
43
44
FROM ubuntu:22.04
# Database environment variables will be set by docker-compose.yml
ENV PGDATA=/var/lib/postgresql/data
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies in a single layer
RUN apt-get update && apt-get install -y \
curl \
git \
build-essential \
vim \
tini \
sudo \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
# Install Node.js 24.x (LTS) and Yarn
RUN curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g yarn \
&& npm cache clean --force
WORKDIR /app
# Copy package files first for better caching
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
# Copy source code
COPY . .
# Create necessary directories
RUN mkdir -p /app/logs
EXPOSE 3000 8000
HEALTHCHECK --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:3000/status || exit 1
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["yarn", "dev"]