added toml
This commit is contained in:
parent
e1eba0c210
commit
c3efa45873
2 changed files with 20 additions and 12 deletions
|
|
@ -7,8 +7,8 @@ FROM node:${NODE_VERSION}-slim AS base
|
|||
# Set the working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package.json and package-lock.json for dependency installation
|
||||
COPY --link package.json package-lock.json ./
|
||||
COPY . .
|
||||
RUN npm install
|
||||
|
||||
# Install dependencies using npm ci for deterministic builds
|
||||
RUN --mount=type=cache,target=/root/.npm npm ci --production
|
||||
|
|
@ -16,14 +16,6 @@ RUN --mount=type=cache,target=/root/.npm npm ci --production
|
|||
# Copy the application source code
|
||||
COPY --link . .
|
||||
|
||||
# Set environment variables for production
|
||||
ENV NODE_ENV=production
|
||||
ENV NODE_OPTIONS="--max-old-space-size=4096"
|
||||
|
||||
# Create a non-root user and switch to it
|
||||
RUN useradd -m appuser
|
||||
USER appuser
|
||||
|
||||
# Expose the application port
|
||||
EXPOSE 8080
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,20 @@
|
|||
# fly.toml app configuration file generated for snaketest on 2025-03-02T11:25:35-08:00
|
||||
# fly.toml app configuration file generated for snaketest-crimson-resonance-3100 on 2025-04-17T09:53:30-07:00
|
||||
#
|
||||
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
|
||||
#
|
||||
|
||||
app = 'snaketest'
|
||||
app = 'snaketest-crimson-resonance-3100'
|
||||
primary_region = 'sea'
|
||||
|
||||
[build]
|
||||
|
||||
[http_service]
|
||||
internal_port = 8000
|
||||
force_https = true
|
||||
auto_stop_machines = 'stop'
|
||||
auto_start_machines = true
|
||||
min_machines_running = 0
|
||||
processes = ['app']
|
||||
|
||||
[[services]]
|
||||
protocol = 'tcp'
|
||||
|
|
@ -17,4 +28,9 @@ app = 'snaketest'
|
|||
port = 80
|
||||
handlers = ['http']
|
||||
|
||||
[[vm]]
|
||||
memory = '1gb'
|
||||
cpu_kind = 'shared'
|
||||
cpus = 1
|
||||
|
||||
[[metrics]]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue