This repository has been archived by the owner on May 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13cdc25
commit 5683b2c
Showing
8 changed files
with
476 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.secure | ||
node_modules |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM keymetrics/pm2:10-alpine | ||
|
||
RUN echo -e 'http://dl-cdn.alpinelinux.org/alpine/edge/main\nhttp://dl-cdn.alpinelinux.org/alpine/edge/community\nhttp://dl-cdn.alpinelinux.org/alpine/edge/testing' > /etc/apk/repositories | ||
RUN apk add --no-cache yarn git | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN yarn | ||
|
||
WORKDIR /app/proxy | ||
|
||
EXPOSE 3000 | ||
|
||
ENV NODE_ENV="production" | ||
|
||
CMD [ "pm2-docker", "start", "pm2.config.js" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const Fastify = require('fastify') | ||
const server = Fastify() | ||
|
||
server.register(require('fastify-http-proxy'), { | ||
upstream: process.env.BACK_URL || 'https://api.checkmoney.space', | ||
}) | ||
|
||
server.listen(3000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "checkmoney-proxy", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"scripts": { | ||
"start:proxy:prod": "pm2 start ./pm2.config.js" | ||
}, | ||
"dependencies": { | ||
"fastify": "^2.2.0", | ||
"fastify-http-proxy": "^2.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
apps: [ | ||
{ | ||
name: 'checkmoney-proxy', | ||
script: 'index.js', | ||
watch: false, | ||
instances: 'max', | ||
exec_mode: 'cluster', | ||
merge_logs: true, | ||
env_production: { NODE_ENV: 'production' }, | ||
}, | ||
], | ||
} |
Oops, something went wrong.