-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
42 lines (31 loc) · 817 Bytes
/
Dockerfile.dev
File metadata and controls
42 lines (31 loc) · 817 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
# Development Dockerfile with hot reload and RocksDB support
FROM golang:1.24-alpine
WORKDIR /app
# Install development tools and RocksDB dependencies
RUN apk add --no-cache \
git \
nodejs \
npm \
build-base \
rocksdb-dev \
snappy-dev \
lz4-dev \
zstd-dev \
bzip2-dev \
zlib-dev
# Enable CGO for RocksDB
ENV CGO_ENABLED=1
# Install Air for Go hot reload (v1.61.7 works with Go 1.24)
RUN go install github.com/air-verse/air@v1.61.7
# Install templ
RUN go install github.com/a-h/templ/cmd/templ@latest
# Copy go mod files first for caching
COPY go.mod go.sum ./
RUN go mod download
# Copy package.json for npm
COPY package.json tsconfig.json ./
RUN npm install
# The rest will be mounted as volume
EXPOSE 8081
# Start Air for hot reload
CMD ["air", "-c", ".air.toml"]