Skip to content

Commit 332008a

Browse files
committed
docker implementation
1 parent 4969c01 commit 332008a

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ pnpm-debug.log*
2222

2323
# jetbrains setting folder
2424
.idea/
25+
26+
# ai-example files
27+
ai-examples/

Dockerfile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM node:20-alpine as build
2+
3+
WORKDIR /app
4+
5+
COPY package*.json ./
6+
7+
RUN npm ci
8+
9+
COPY . .
10+
11+
RUN npm run build
12+
13+
FROM nginx:alpine
14+
15+
COPY --from=build /app/dist /usr/share/nginx/html
16+
17+
EXPOSE 80
18+
19+
CMD ["nginx", "-g", "daemon off;"]

docker-compose.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
services:
2+
astro-blog:
3+
container_name: astro-blog
4+
build: .
5+
ports:
6+
- "80:80"
7+
healthcheck:
8+
test: ["CMD", "wget", "--spider", "-q", "http://localhost:80"]
9+
interval: 30s
10+
timeout: 10s
11+
retries: 3
12+
start_period: 40s
13+
logging:
14+
driver: "json-file"
15+
options:
16+
max-size: "10m"
17+
max-file: "3"

0 commit comments

Comments
 (0)