mirror of
https://github.com/lklynet/hypermind.git
synced 2026-05-04 01:50:33 +00:00
Merge pull request #2 from LunyaaDev/perf/dockerfile
perf: reduce docker image size
This commit is contained in:
+2
-7
@@ -1,15 +1,10 @@
|
||||
FROM node:18-bookworm
|
||||
FROM node:20-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV npm_config_build_from_source=true
|
||||
ENV PYTHON=/usr/bin/python3
|
||||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm ci --only=production
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
COPY server.js ./
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
services:
|
||||
hypermind:
|
||||
build: .
|
||||
image: hypermind
|
||||
container_name: hypermind
|
||||
network_mode: host
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- PORT=3000
|
||||
@@ -0,0 +1,8 @@
|
||||
services:
|
||||
hypermind:
|
||||
image: ghcr.io/lklynet/hypermind:latest
|
||||
container_name: hypermind
|
||||
network_mode: host
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- PORT=3000
|
||||
Reference in New Issue
Block a user