Hi, I am trying to deploy node.js application with Nest.js framework and deployment(fly deploy) is throwing an 401 error. I even tried to log in to npm but it didn’t help, still got same error. I didn’t find any way how to fix this. Is there anybody who can help me? Thanks a lot!
screenshot of full log:
generated dockerfile:
# syntax = docker/dockerfile:1
# Adjust NODE_VERSION as desired
ARG NODE_VERSION=18.12.1
FROM node:${NODE_VERSION}-slim as base
LABEL fly_launch_runtime="NestJS"
# NestJS app lives here
WORKDIR /app
# Set production environment
ENV NODE_ENV="production"
# Throw-away build stage to reduce size of final image
FROM base as build
# Install packages needed to build node modules
RUN apt-get update -qq && \
apt-get install -y build-essential pkg-config python
# Install node modules
COPY --link package-lock.json package.json ./
RUN npm ci --include=dev
# Copy application code
COPY --link . .
# Build application
RUN npm run build
# Final stage for app image
FROM base
# Copy built application
COPY --from=build /app /app
# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
CMD [ "npm", "run", "start" ]
generated fly.toml
# fly.toml app configuration file generated for skialpp on 2023-11-06T00:25:01+01:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
app = "skialpp"
primary_region = "ams"
[build]
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = ["app"]