Skip to content

Commit 4542fa6

Browse files
author
Fly.io
committed
New files from Fly.io Launch
1 parent 3e4a90e commit 4542fa6

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

server/.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/.git
2+
/node_modules
3+
.dockerignore
4+
.env
5+
Dockerfile
6+
fly.toml

server/Dockerfile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# syntax = docker/dockerfile:1
2+
3+
# Adjust NODE_VERSION as desired
4+
ARG NODE_VERSION=22.21.1
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
26+
27+
# Copy application code
28+
COPY . .
29+
30+
31+
# Final stage for app image
32+
FROM base
33+
34+
# Copy built application
35+
COPY --from=build /app /app
36+
37+
# Start the server by default, this can be overwritten at runtime
38+
EXPOSE 3000
39+
CMD [ "npm", "run", "start" ]

server/fly.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# fly.toml app configuration file generated for xalqarologistika on 2026-01-06T08:44:45Z
2+
#
3+
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
4+
#
5+
6+
app = 'xalqarologistika'
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

0 commit comments

Comments
 (0)