Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile #5

Closed
wants to merge 118 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
ba50a0e
feat: add dockerfile
Siumauricio Jun 27, 2024
bb21d79
refactor: update
Siumauricio Jun 27, 2024
aa378ca
refactor: update
Siumauricio Jun 27, 2024
513e0e6
refactor: remove cache type
Siumauricio Jun 27, 2024
06057e6
Update index.js
Siumauricio Jun 28, 2024
193668a
Update index.js
Siumauricio Jun 28, 2024
b6f615f
Update index.js
Siumauricio Jun 28, 2024
2c2b7e3
Update README.md
Siumauricio Jun 28, 2024
b9e31f7
Update index.js
Siumauricio Jul 5, 2024
fbcf775
Update index.js
Siumauricio Jul 5, 2024
cd5ac44
Update index.js
Siumauricio Jul 5, 2024
714f7c6
Update index.js
Siumauricio Jul 5, 2024
34233b8
Update index.js
Siumauricio Jul 5, 2024
d043cf8
Update index.js
Siumauricio Jul 5, 2024
5a25a0f
Update index.js
Siumauricio Nov 30, 2024
ea071e9
Update index.js
Siumauricio Nov 30, 2024
3605de3
Update index.js
Siumauricio Nov 30, 2024
176bde0
Update index.js
Siumauricio Nov 30, 2024
9a4dfd4
Update index.js
Siumauricio Nov 30, 2024
147dd91
Update index.js
Siumauricio Nov 30, 2024
5bcf42d
Update index.js
Siumauricio Nov 30, 2024
3a70869
Update index.js
Siumauricio Nov 30, 2024
abcf511
Update index.js
Siumauricio Nov 30, 2024
4aaa122
Update index.js
Siumauricio Nov 30, 2024
59634d9
Update index.js
Siumauricio Nov 30, 2024
2e6e66d
Update index.js
Siumauricio Nov 30, 2024
efdd838
Update index.js
Siumauricio Dec 1, 2024
6f8830f
Update index.js
Siumauricio Dec 1, 2024
6d42303
Update index.js
Siumauricio Dec 1, 2024
c726cb9
Update index.js
Siumauricio Dec 1, 2024
3e4446b
Update index.js
Siumauricio Dec 1, 2024
6421a64
Update index.js
Siumauricio Dec 1, 2024
e01b3fa
Update index.js
Siumauricio Dec 1, 2024
dfabbff
Update index.js
Siumauricio Dec 1, 2024
8052de7
Update index.js
Siumauricio Dec 1, 2024
83a63f1
Update index.js
Siumauricio Dec 1, 2024
25ebe12
Update index.js
Siumauricio Dec 1, 2024
10eed00
Update index.js
Siumauricio Dec 1, 2024
717ae7b
Update index.js
Siumauricio Dec 1, 2024
5508a78
Update index.js
Siumauricio Dec 1, 2024
134e3b0
Update index.js
Siumauricio Dec 1, 2024
8c109ec
Update index.js
Siumauricio Dec 1, 2024
147decf
Update package.json
Siumauricio Dec 1, 2024
6412711
Update package.json
Siumauricio Dec 1, 2024
1890b92
Update Dockerfile
Siumauricio Dec 1, 2024
967f6b7
Update Dockerfile
Siumauricio Dec 1, 2024
eda35f9
Update Dockerfile
Siumauricio Dec 1, 2024
17c248e
Update Dockerfile
Siumauricio Dec 1, 2024
c9677ea
Update index.js
Siumauricio Dec 1, 2024
d16e7e0
Update index.js
Siumauricio Dec 1, 2024
ce02b98
Update index.js
Siumauricio Dec 1, 2024
cc0fcf1
Update index.js
Siumauricio Dec 1, 2024
8aaa253
Update index.js
Siumauricio Dec 1, 2024
3635140
Update index.js
Siumauricio Dec 1, 2024
4eef09e
Update index.js
Siumauricio Dec 1, 2024
cf26dd6
Update index.js
Siumauricio Dec 1, 2024
d41561b
Update index.js
Siumauricio Dec 1, 2024
19a7a72
Update index.js
Siumauricio Dec 1, 2024
507ebf1
Update index.js
Siumauricio Dec 1, 2024
2822f3b
Update index.js
Siumauricio Dec 1, 2024
e00b6ed
Update index.js
Siumauricio Dec 1, 2024
a041ff7
Update index.js
Siumauricio Dec 1, 2024
80c636e
Update index.js
Siumauricio Dec 1, 2024
b92bf5d
Update index.js
Siumauricio Dec 1, 2024
f2c815f
Update index.js
Siumauricio Dec 1, 2024
626a133
Update index.js
Siumauricio Dec 1, 2024
d69e7ad
Update index.js
Siumauricio Dec 1, 2024
9f51971
Update index.js
Siumauricio Dec 1, 2024
263cf8c
Update index.js
Siumauricio Dec 2, 2024
24d49e1
Update index.js
Siumauricio Dec 2, 2024
e873548
Update index.js
Siumauricio Dec 2, 2024
4b98c8a
Update index.js
Siumauricio Dec 2, 2024
40dfb78
Update index.js
Siumauricio Dec 2, 2024
e4b8f2c
Update index.js
Siumauricio Dec 2, 2024
8d5b6ec
Update index.js
Siumauricio Dec 2, 2024
af1e5f9
Update index.js
Siumauricio Dec 2, 2024
e85706e
Update index.js
Siumauricio Dec 2, 2024
9e7b88f
Update index.js
Siumauricio Dec 2, 2024
f8ce1d4
Update index.js
Siumauricio Dec 2, 2024
54a25a8
Update index.js
Siumauricio Dec 2, 2024
92d2fab
Update index.js
Siumauricio Dec 2, 2024
a6b2309
Update index.js
Siumauricio Dec 2, 2024
2ea65fd
Update index.js
Siumauricio Dec 2, 2024
9d5ddeb
Update index.js
Siumauricio Dec 2, 2024
4935473
Update index.js
Siumauricio Dec 2, 2024
b1394cc
Update index.js
Siumauricio Dec 2, 2024
7820ca1
Update index.js
Siumauricio Dec 2, 2024
5f01361
Update index.js
Siumauricio Dec 2, 2024
f47daaa
Update index.js
Siumauricio Dec 8, 2024
c2d8a3f
Update index.js
Siumauricio Dec 8, 2024
c3b17fd
Update index.js
Siumauricio Dec 8, 2024
f0c50a4
Update index.js
Siumauricio Dec 8, 2024
d874bc7
Update index.js
Siumauricio Dec 8, 2024
140728f
Update index.js
Siumauricio Dec 8, 2024
824e5b4
Update index.js
Siumauricio Dec 8, 2024
d91ee1f
Update index.js
Siumauricio Dec 8, 2024
ffa9731
Update index.js
Siumauricio Dec 8, 2024
c4a510b
Update index.js
Siumauricio Dec 8, 2024
417a2f9
Update index.js
Siumauricio Dec 8, 2024
d6ad563
Update index.js
Siumauricio Dec 8, 2024
36672ed
Update index.js
Siumauricio Dec 8, 2024
e57b6a6
Update index.js
Siumauricio Dec 8, 2024
0aa1985
Update index.js
Siumauricio Dec 8, 2024
02a14f2
Update index.js
Siumauricio Dec 8, 2024
22bf069
Update index.js
Siumauricio Dec 8, 2024
109564d
Update index.js
Siumauricio Dec 8, 2024
af832b4
Update index.js
Siumauricio Dec 8, 2024
72e0f04
Update index.js
Siumauricio Dec 8, 2024
4821524
Update index.js
Siumauricio Dec 8, 2024
7f20ded
Update index.js
Siumauricio Dec 8, 2024
1deda13
Update index.js
Siumauricio Dec 8, 2024
92163db
Update index.js
Siumauricio Dec 8, 2024
56751a0
Update index.js
Siumauricio Jan 23, 2025
a725cc3
Update index.js
Siumauricio Jan 23, 2025
35657fe
Update index.js
Siumauricio Jan 23, 2025
ce0e929
Update index.js
Siumauricio Jan 23, 2025
dacd59b
Merge branch 'main' into dockerfile
Siumauricio Jan 26, 2025
d8b6593
Update index.js
Siumauricio Jan 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM node:20-slim AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
COPY . /app
WORKDIR /app


FROM base AS prod-depss
RUN pnpm install --prod --frozen-lockfile

FROM base AS build
RUN pnpm install --frozen-lockfile
RUN pnpm run build

FROM base
COPY --from=prod-deps /app/node_modules /app/node_modules
EXPOSE 3000
CMD [ "pnpm", "start" ]

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# swarm-test
f
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ const delay = ms => new Promise(resolve => setTimeout(resolve, ms));

// Definir las rutas después del delay
app.get('/', (req, res) => {
res.send(`Hello from instance ${instanceId}`);
res.send(`Hello from instance222${instanceId}`);
});

app.get('/health', (req, res) => {
res.send(`Hello from instance ${instanceId}`);
res.send(`Hello from instance222 ${instanceId}`);
});

app.listen(port, () => {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node index.js"
"start": "node index.js",
"build": "echo \"No build script specified\""
},
"dependencies": {
"express": "^4.19.2"
Expand Down