File tree Expand file tree Collapse file tree 3 files changed +74
-0
lines changed Expand file tree Collapse file tree 3 files changed +74
-0
lines changed Original file line number Diff line number Diff line change
1
+ /.git
2
+ /node_modules
3
+ .dockerignore
4
+ .env
5
+ Dockerfile
6
+ fly.toml
Original file line number Diff line number Diff line change
1
+ # syntax = docker/dockerfile:1
2
+
3
+ # Adjust NODE_VERSION as desired
4
+ ARG NODE_VERSION=20.18.0
5
+ FROM node:${NODE_VERSION}-slim AS base
6
+
7
+ LABEL fly_launch_runtime="Node.js"
8
+
9
+ # Node.js app lives here
10
+ WORKDIR /app
11
+
12
+ # Set production environment
13
+ ENV NODE_ENV="production"
14
+
15
+
16
+ # Throw-away build stage to reduce size of final image
17
+ FROM base AS build
18
+
19
+ # Install packages needed to build node modules
20
+ RUN apt-get update -qq && \
21
+ apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3
22
+
23
+ # Install node modules
24
+ COPY package-lock.json package.json ./
25
+ RUN npm ci --include=dev
26
+
27
+ # Copy application code
28
+ COPY . .
29
+
30
+ # Build application
31
+ RUN npm run build
32
+
33
+ # Remove development dependencies
34
+ RUN npm prune --omit=dev
35
+
36
+
37
+ # Final stage for app image
38
+ FROM base
39
+
40
+ # Copy built application
41
+ COPY --from=build /app /app
42
+
43
+ # Start the server by default, this can be overwritten at runtime
44
+ EXPOSE 3000
45
+ CMD [ "npm" , "run" , "start" ]
Original file line number Diff line number Diff line change
1
+ # fly.toml app configuration file generated for quicksnip on 2025-07-02T13:29:43Z
2
+ #
3
+ # See https://fly.io/docs/reference/configuration/ for information about how to use this file.
4
+ #
5
+
6
+ app = ' quicksnip'
7
+ primary_region = ' arn'
8
+
9
+ [build ]
10
+
11
+ [http_service ]
12
+ internal_port = 3000
13
+ force_https = true
14
+ auto_stop_machines = ' stop'
15
+ auto_start_machines = true
16
+ min_machines_running = 0
17
+ processes = [' app' ]
18
+
19
+ [[vm ]]
20
+ memory = ' 1gb'
21
+ cpu_kind = ' shared'
22
+ cpus = 1
23
+ memory_mb = 1024
You can’t perform that action at this time.
0 commit comments