Skip to content

Commit

Permalink
⬆️ move to node 20
Browse files Browse the repository at this point in the history
  • Loading branch information
haliphax committed Oct 25, 2024
1 parent 91ce7c3 commit c646c1a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/hydrogen
lts/iron
19 changes: 11 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
# syntax = docker/dockerfile:1
FROM node:18-slim as base

ARG NODE_VERSION=20

FROM node:${NODE_VERSION}-slim as base
LABEL fly_launch_runtime="Node.js"
WORKDIR /app
ENV NODE_ENV="production"

FROM base as build
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends \
build-essential=12.9 pkg-config=1.8.1-1 python-is-python3=3.11.1-3
COPY --link package-lock.json package.json ./
RUN npm ci --include=dev
COPY --link . .
RUN npm run build && npm prune --omit=dev
build-essential=12.9 pkg-config=1.8.1-1 python-is-python3=3.11.2-1+deb12u1
COPY package-lock.json package.json ./
COPY . .
RUN npm ci --include=dev && npm run build && npm prune --omit=dev

FROM base
COPY --from=build /app /app
RUN mkdir -p /app/db
VOLUME /app/db
RUN mkdir -p /data
VOLUME /data
EXPOSE 3000
ENV DATABASE_URL="file:///data/sqlite.db"
ENV host="0.0.0.0"
CMD [ "npm", "run", "start" ]
2 changes: 1 addition & 1 deletion fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source = "db"

[http_service]
auto_start_machines = true
auto_stop_machines = "stop"
auto_stop_machines = true
force_https = true
internal_port = 3000
min_machines_running = 1
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"npm": "^10"
},
"engines": {
"node": "^18"
"node": "^20"
},
"name": "narf",
"prettier": {
Expand Down

0 comments on commit c646c1a

Please sign in to comment.