-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
17 changed files
with
269 additions
and
605 deletions.
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,8 @@ | ||
node_modules | ||
Dockerfile | ||
docker-compose.yaml | ||
.git | ||
.github | ||
.gitignore | ||
test/ | ||
config/ |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Node CI deploy | ||
name: Publish to remote server | ||
|
||
on: | ||
push: | ||
|
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,37 @@ | ||
|
||
FROM node:16.13-alpine3.12 | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json ./ | ||
|
||
RUN npm install | ||
|
||
COPY . ./ | ||
|
||
ARG MONGODB_URL=mongodb | ||
ARG MONGODB_NAME=finra-short-api | ||
ARG MONGO_INITDB_ROOT_USERNAME=admin | ||
ARG MONGO_INITDB_ROOT_PASSWORD=secret | ||
ARG JWT_SECRET=SomeRandomString | ||
ARG ADMIN_SECRET=RandomSecretForUserCreationRoute | ||
ARG SANDBOX_TOKEN=TinkoffApiSandboxToken | ||
ARG SENTRY_DSN=https://[email protected]/1 | ||
ARG SENTRY_TRACE_RATE=0.25 | ||
|
||
ENV MONGODB_URL=${MONGODB_URL} | ||
ENV MONGODB_NAME=${MONGODB_NAME} | ||
ENV MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME} | ||
ENV MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD} | ||
ENV JWT_SECRET=${JWT_SECRET} | ||
ENV ADMIN_SECRET=${ADMIN_SECRET} | ||
ENV SANDBOX_TOKEN=${SANDBOX_TOKEN} | ||
ENV SENTRY_DSN=${SENTRY_DSN} | ||
ENV SENTRY_TRACE_RATE=${SENTRY_TRACE_RATE} | ||
ENV PORT=3001 | ||
|
||
EXPOSE 3001 | ||
|
||
RUN npm run build | ||
|
||
CMD ["npm", "run", "start:prod"] |
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
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 @@ | ||
version: '3.8' | ||
|
||
services: | ||
mongodb: | ||
image: 'mongo' | ||
volumes: | ||
- ./data:/data/db | ||
env_file: | ||
- ./config/.production.env | ||
|
||
finra-api: | ||
build: ./ | ||
ports: | ||
- '3001:3001' | ||
env_file: | ||
- ./config/.production.env | ||
depends_on: | ||
- mongodb |
Oops, something went wrong.