This commit is contained in:
parent
e0a1ca9a92
commit
784f1cef07
5
.dockerignore
Normal file
5
.dockerignore
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
node_modules
|
||||
.git
|
||||
.next
|
||||
dist
|
||||
*.log
|
||||
|
|
@ -1,6 +1,18 @@
|
|||
FROM --platform=linux/amd64 node:20-bookworm-slim
|
||||
FROM --platform=linux/amd64 node:20-bookworm-slim AS builder
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
CMD ["npx", "tsx", "scripts/update-space.ts"]
|
||||
RUN npx tsc scripts/update-space.ts --outDir dist --module esnext --target esnext --moduleResolution node
|
||||
|
||||
FROM --platform=linux/amd64 node:20-bookworm-slim
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
COPY package*.json ./
|
||||
RUN npm install --omit=dev
|
||||
COPY --from=builder /app/dist/scripts/update-space.js ./scripts/
|
||||
COPY --from=builder /app/lib ./lib
|
||||
COPY --from=builder /app/config ./config
|
||||
RUN mkdir -p /app/data
|
||||
|
||||
CMD ["node", "scripts/update-space.js"]
|
||||
|
|
@ -11,6 +11,9 @@ services:
|
|||
- web_traffic
|
||||
|
||||
worker:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Worker.Dockerfile
|
||||
image: git.georgew.dev/georgew/mission-control-worker:latest
|
||||
container_name: mc-worker
|
||||
restart: always
|
||||
|
|
|
|||
Loading…
Reference in a new issue