This repository has been archived on 2026-01-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2025-07-03 17:55:15 +03:00
|
|
|
# ------ Dependencies stage ------
|
|
|
|
|
FROM oven/bun:1.2.18-alpine@sha256:a7df687a2f684ee2f7404e2592039e192d75d26a04f843e60d9fc342741187d0 AS deps
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
# Install dependencies
|
2025-07-13 21:37:56 +03:00
|
|
|
COPY frontend/package.json frontend/bun.lock ./
|
2025-07-03 17:55:15 +03:00
|
|
|
RUN bun install --frozen-lockfile
|
|
|
|
|
|
2025-07-13 21:37:56 +03:00
|
|
|
# ------ Build stage ------
|
|
|
|
|
FROM deps AS build
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
# Copy code, and compile
|
|
|
|
|
COPY frontend/ .
|
|
|
|
|
RUN bun run build
|
|
|
|
|
|
2025-07-03 17:55:15 +03:00
|
|
|
# ------ Development stage ------
|
|
|
|
|
FROM deps AS dev
|
|
|
|
|
|
|
|
|
|
# Run
|
|
|
|
|
CMD ["bun", "run", "dev"]
|
|
|
|
|
|
2025-07-13 21:37:56 +03:00
|
|
|
# ------ Production stage ------
|
|
|
|
|
FROM caddy:2.10.0-alpine@sha256:e2e3a089760c453bc51c4e718342bd7032d6714f15b437db7121bfc2de2654a6 AS prod
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
# Copy built code
|
|
|
|
|
COPY --from=build /app/dist .
|
|
|
|
|
|
|
|
|
|
# Copy configuration for caddy
|
|
|
|
|
COPY caddy/prod /etc/caddy/Caddyfile
|