feat(infra/nginx): Fixed nginx redirection and fixed dockerfiles
- nginx now use "raw" proxy_pass, where it doesnt supply the $uri since if only the host is provided, nginx will handle lots of usecases - pnpm now uses the lockfile correctly - Docker: use lockfile in all steps - Docker: install the necessary packages if building from source is needed (better-sqlite3 for example)
This commit is contained in:
parent
2074f8d8f1
commit
26627cd4d7
7 changed files with 3886 additions and 5966 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -4,7 +4,6 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
*.pdf
|
*.pdf
|
||||||
**/dist/
|
**/dist/
|
||||||
pnpm-lock.yaml
|
|
||||||
|
|
||||||
# sqlite stuff
|
# sqlite stuff
|
||||||
*.db
|
*.db
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#forward the post request to the microservice
|
#forward the post request to the microservice
|
||||||
location /api/auth/ {
|
location /api/auth/ {
|
||||||
proxy_pass http://auth$uri;
|
proxy_pass http://auth;
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#forward the post request to the microservice
|
#forward the post request to the microservice
|
||||||
location /api/user/ {
|
location /api/user/ {
|
||||||
proxy_pass http://user$uri;
|
proxy_pass http://user;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,31 @@
|
||||||
FROM node:22-alpine AS pnpm_base
|
FROM node:22-alpine AS pnpm_base
|
||||||
RUN npm install --global pnpm@10.14.0;
|
RUN npm install --global pnpm@10 --no-fund -q;
|
||||||
|
RUN apk add make python3 gcc clang build-base musl-dev;
|
||||||
|
|
||||||
FROM pnpm_base AS builder
|
FROM pnpm_base AS builder
|
||||||
|
|
||||||
ARG SERVICE
|
ARG SERVICE
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
COPY @shared/package.json /build/@shared/
|
COPY package.json /build/
|
||||||
COPY ${SERVICE}/package.json /build/service/
|
COPY @shared/package.json /build/@shared/
|
||||||
COPY tsconfig.base.json pnpm-workspace.yaml package.json /build/
|
COPY ${SERVICE}/ /build/${SERVICE}
|
||||||
COPY ${SERVICE}/entrypoint.sh /build/
|
COPY tsconfig.base.json pnpm-workspace.yaml pnpm-lock.yaml /build/
|
||||||
|
COPY ${SERVICE}/entrypoint.sh /build/
|
||||||
|
|
||||||
RUN pnpm install;
|
RUN pnpm install --frozen-lockfile;
|
||||||
|
|
||||||
COPY @shared/ /build/@shared/
|
COPY @shared/ /build/@shared/
|
||||||
COPY ${SERVICE}/ /build/service/
|
COPY ${SERVICE}/ /build/${SERVICE}/
|
||||||
|
|
||||||
RUN cd /build/service && \
|
RUN cd /build/${SERVICE} && \
|
||||||
pnpm run build:prod && \
|
pnpm run build:prod && \
|
||||||
mkdir -p /dist/@shared /dist/service && \
|
mkdir -p /dist/@shared /dist/${SERVICE} && \
|
||||||
cp /build/pnpm-workspace.yaml /dist/pnpm-workspace.yaml && \
|
cp /build/pnpm-workspace.yaml /dist/pnpm-workspace.yaml && \
|
||||||
cp /build/@shared/package.json /dist/@shared/ && \
|
cp /build/pnpm-lock.yaml /dist/pnpm-lock.yaml && \
|
||||||
cp /build/service/package.json /dist/service/ && \
|
cp /build/@shared/package.json /dist/@shared/ && \
|
||||||
cp /build/package.json /dist/ && \
|
cp /build/${SERVICE}/package.json /dist/${SERVICE}/ && \
|
||||||
cp /build/pnpm-lock.yaml /dist/ && \
|
cp /build/entrypoint.sh /dist/ && \
|
||||||
cp /build/entrypoint.sh /dist/ && \
|
|
||||||
chmod +x /dist/entrypoint.sh;
|
chmod +x /dist/entrypoint.sh;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
5940
src/package-lock.json
generated
5940
src/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -24,14 +24,14 @@
|
||||||
"dev:prepare": "husky"
|
"dev:prepare": "husky"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"rimraf": "^5.0.1",
|
"@eslint/js": "^9.38.0",
|
||||||
"@eslint/js": "^9.36.0",
|
"@typescript-eslint/eslint-plugin": "^8.46.2",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.44.1",
|
"@typescript-eslint/parser": "^8.46.2",
|
||||||
"@typescript-eslint/parser": "^8.44.1",
|
"eslint": "^9.38.0",
|
||||||
"eslint": "^9.36.0",
|
|
||||||
"lint-staged": "^16.1.5",
|
|
||||||
"husky": "^9.1.7",
|
"husky": "^9.1.7",
|
||||||
"typescript-eslint": "^8.44.1"
|
"lint-staged": "^16.2.6",
|
||||||
|
"rimraf": "^5.0.10",
|
||||||
|
"typescript-eslint": "^8.46.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bindings": "^1.5.0"
|
"bindings": "^1.5.0"
|
||||||
|
|
|
||||||
3860
src/pnpm-lock.yaml
generated
Normal file
3860
src/pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue