mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-17 08:01:03 +00:00
feat(website): add Dockerfile for Astro site
This commit is contained in:
parent
d5b5efebb6
commit
32c0c71a79
1 changed files with 26 additions and 0 deletions
26
website/Dockerfile
Normal file
26
website/Dockerfile
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
FROM node:22-alpine AS build
|
||||||
|
WORKDIR /app
|
||||||
|
RUN npm install -g pnpm
|
||||||
|
|
||||||
|
# Copy package files
|
||||||
|
COPY package.json pnpm-lock.yaml* ./
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN pnpm install --frozen-lockfile || pnpm install
|
||||||
|
|
||||||
|
# Copy source
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Build
|
||||||
|
RUN pnpm build
|
||||||
|
|
||||||
|
FROM caddy:alpine
|
||||||
|
COPY --from=build /app/dist /srv
|
||||||
|
RUN cat > /etc/caddy/Caddyfile <<'EOF'
|
||||||
|
:80 {
|
||||||
|
root * /srv
|
||||||
|
file_server
|
||||||
|
try_files {path} /index.html
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
EXPOSE 80
|
||||||
Loading…
Add table
Add a link
Reference in a new issue