chore: restructure Dockerfile and move entrypoint to root

This commit is contained in:
2026-05-25 19:55:21 +02:00
parent 76a92894e8
commit 53abdace1c
4 changed files with 28 additions and 17 deletions

View File

@@ -5,14 +5,22 @@ WORKDIR /app
# Enable CGO for sqlite3
ENV CGO_ENABLED=1
# Install sqlc for code generation
RUN go install github.com/sqlc-dev/sqlc/cmd/sqlc@v1.30.0
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
gcc \
libc6-dev \
libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/*
# Install build dependencies for bun + assets
RUN apt-get update && apt-get install -y ca-certificates sqlite3 curl unzip && rm -rf /var/lib/apt/lists/*
# Install bun (for building frontend assets)
RUN curl -fsSL https://bun.sh/install | bash
ENV PATH="/root/.bun/bin:${PATH}"
# Install sqlc for code generation
RUN go install github.com/sqlc-dev/sqlc/cmd/sqlc@v1.30.0
ENV GOPROXY=direct
COPY go.mod go.sum ./
RUN go mod download
@@ -50,7 +58,7 @@ COPY --from=builder /app/templates ./templates
COPY --from=builder /app/static ./static
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/internal/database/migrations ./migrations
COPY docker/entrypoint.sh ./entrypoint.sh
COPY entrypoint.sh ./entrypoint.sh
EXPOSE 3000