mirror of
https://github.com/tonytins/tonybark.com.git
synced 2025-03-15 07:21:21 +00:00
feat: dockerized
This commit is contained in:
parent
8d9413b013
commit
3e776018d6
2 changed files with 30 additions and 0 deletions
19
Dockerfile
Normal file
19
Dockerfile
Normal file
|
@ -0,0 +1,19 @@
|
|||
FROM node:22-alpine AS base
|
||||
|
||||
FROM base AS deps
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm install
|
||||
|
||||
FROM base AS builder
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/build ./
|
||||
ENV PORT=3000
|
||||
EXPOSE 3000
|
||||
CMD ["node", "index.js"]
|
11
compose.yaml
Normal file
11
compose.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
services:
|
||||
whitebreeze:
|
||||
container_name: whitebreeze
|
||||
pull_policy: build
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
env_file: ./.env
|
||||
ports:
|
||||
- 5000:3000
|
Loading…
Add table
Reference in a new issue