-
Notifications
You must be signed in to change notification settings - Fork 65
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
t.kosminov
committed
Nov 7, 2024
1 parent
88a8742
commit a61085f
Showing
133 changed files
with
12,547 additions
and
12,896 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 |
---|---|---|
@@ -1,5 +1,48 @@ | ||
.vsconfig | ||
.husky | ||
# compiled output | ||
dist | ||
node_modules | ||
test_pages | ||
.env.*.local | ||
|
||
.git | ||
|
||
.yarn/cache | ||
.yarn/install-state.gz | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
pnpm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# OS | ||
.DS_Store | ||
|
||
# Tests | ||
/coverage | ||
/.nyc_output | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
schema.graphql | ||
graph.png | ||
|
||
uploads/* | ||
!uploads/.gitkeep | ||
pgdata |
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 |
---|---|---|
@@ -1,4 +1 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run lint-fix | ||
npm run lint:fix |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodejs 22.9.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 |
---|---|---|
@@ -1,17 +1,22 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
// ! https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "pwa-node", | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Launch Program", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
"name": "debug", | ||
"cwd": "${workspaceFolder}", | ||
"runtimeExecutable": "npm", | ||
"args": [ | ||
"run", | ||
"start:dev", | ||
], | ||
"program": "${workspaceFolder}/src/main.ts" | ||
} | ||
"runtimeArgs": [], | ||
"env": { | ||
"NODE_ENV": "development", | ||
"TS_NODE_PROJECT": "${workspaceFolder}/tsconfig.json" | ||
}, | ||
}, | ||
] | ||
} | ||
} |
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,58 +1,48 @@ | ||
FROM mhart/alpine-node:14 | ||
# FROM node:16-alpine | ||
FROM node:22-alpine AS base | ||
|
||
# Env | ||
ENV DOCKER_DEPLOY=true | ||
ENV ALLOW_CONFIG_MUTATIONS=true | ||
|
||
ARG env | ||
|
||
ARG commit_short_sha | ||
ARG pipeline_created_at | ||
|
||
# RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories | ||
|
||
# Timezone | ||
|
||
RUN apk update | ||
RUN apk add --update tzdata && \ | ||
cp /usr/share/zoneinfo/UTC /etc/localtime && \ | ||
echo "UTC" > /etc/timezone | ||
|
||
# Nginx | ||
RUN apk add --update --no-cache tzdata \ | ||
nano \ | ||
bash \ | ||
htop \ | ||
nginx \ | ||
nginx-mod-http-lua \ | ||
&& cp /usr/share/zoneinfo/UTC /etc/localtime \ | ||
&& echo "UTC" > /etc/timezone \ | ||
&& mkdir -p /run/nginx | ||
|
||
RUN apk add --update --no-cache nginx && \ | ||
mkdir -p /run/nginx | ||
COPY ./nginx.conf /etc/nginx/http.d/default.conf | ||
|
||
# Apk | ||
RUN nginx -t | ||
|
||
RUN apk add --update --no-cache --virtual runtime-deps \ | ||
nano \ | ||
postgresql-client \ | ||
readline \ | ||
bash \ | ||
htop | ||
FROM base AS build | ||
|
||
WORKDIR /server | ||
WORKDIR /build | ||
|
||
COPY package.json package-lock.json ./ | ||
|
||
RUN HUSKY_SKIP_INSTALL=true npm ci | ||
RUN npm ci | ||
|
||
COPY . . | ||
COPY tsconfig.json tsconfig.build.json ./ | ||
COPY config ./config | ||
COPY src ./src | ||
|
||
COPY nginx.conf /etc/nginx/conf.d/default.conf | ||
RUN npm run build | ||
|
||
ENV NODE_ENV ${env} | ||
FROM base | ||
|
||
RUN npm run build | ||
WORKDIR /server | ||
|
||
ARG env | ||
ENV NODE_ENV=${env} | ||
|
||
ENV COMMIT_SHORT_SHA ${commit_short_sha} | ||
ENV PIPELINE_CREATED_AT ${pipeline_created_at} | ||
COPY --from=build /build/package.json /build/package-lock.json ./ | ||
|
||
RUN touch build_info.txt | ||
RUN echo "env: ${env}" >> build_info.txt | ||
RUN echo "commit_short_sha: ${commit_short_sha}" >> build_info.txt | ||
RUN echo "pipeline_created_at: ${pipeline_created_at}" >> build_info.txt | ||
RUN npm ci --omit=dev | ||
|
||
EXPOSE 80 | ||
COPY --from=build /build/config ./config | ||
COPY --from=build /build/dist ./dist | ||
|
||
CMD nginx; node -r ts-node/register -r tsconfig-paths/register ./dist/main.js | ||
CMD nginx; npm run start:build |
Oops, something went wrong.