Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
devthejo committed Sep 11, 2023
1 parent 3672d20 commit 98cb41e
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 3,963 deletions.
4 changes: 2 additions & 2 deletions shared/elasticsearch-document-adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"version": "2.14.0",
"dependencies": {
"@elastic/elasticsearch": "^7.14.1",
"@socialgouv/cdtn-elasticsearch": "^2.14.0",
"@socialgouv/cdtn-logger": "^2.14.0",
"@socialgouv/cdtn-elasticsearch": "^2.13.0",
"@socialgouv/cdtn-logger": "workspace:^",
"@socialgouv/cdtn-monolog": "^1.5.11",
"@socialgouv/cdtn-slugify": "^4.52.1",
"@socialgouv/cdtn-sources": "^4.52.1",
Expand Down
2 changes: 1 addition & 1 deletion shared/elasticsearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
]
},
"dependencies": {
"@socialgouv/cdtn-logger": "^2.14.0",
"@socialgouv/cdtn-logger": "workspace:^",
"got": "^11.8.2"
},
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion shared/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint-staged": "^12.0.0",
"prettier": "^2.3.2",
"std-mocks": "^1.0.1",
"typescript": "^4.4.3"
"typescript": "^4.9.5"
},
"license": "Apache-2.0",
"main": "lib/index.js",
Expand Down
4 changes: 1 addition & 3 deletions shared/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
"@socialgouv/contributions-data-types": "^3.27.0",
"@socialgouv/fiches-travail-data-types": "^4.191.0",
"@socialgouv/kali-data-types": "^2.127.0",
"@socialgouv/legi-data-types": "^2.73.1"
},
"dependencies": {
"@socialgouv/legi-data-types": "^2.73.1",
"typescript": "^4.9.5"
}
}
1 change: 0 additions & 1 deletion targets/contributions/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ RUN yarn workspace @socialgouv/contibutions build
RUN yarn workspaces focus --production @socialgouv/contibutions && yarn cache clean
RUN mkdir -p /app/targets/contributions/node_modules

# app
FROM node:$NODE_VERSION

Check failure on line 27 in targets/contributions/Dockerfile

View workflow job for this annotation

GitHub Actions / Lint Dockerfile

DL3026 error: Use only an allowed registry in the FROM image

WORKDIR /app
Expand Down
9 changes: 7 additions & 2 deletions targets/export-elasticsearch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
ARG NODE_VERSION=20.3.1-alpine

# dist
FROM node:$NODE_VERSION AS deps

Check failure on line 3 in targets/export-elasticsearch/Dockerfile

View workflow job for this annotation

GitHub Actions / Lint Dockerfile

DL3026 error: Use only an allowed registry in the FROM image

RUN apk add --update python3 make g++ && rm -rf /var/cache/apk/*

Check failure on line 5 in targets/export-elasticsearch/Dockerfile

View workflow job for this annotation

GitHub Actions / Lint Dockerfile

DL3018 warning: Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`

Check failure on line 5 in targets/export-elasticsearch/Dockerfile

View workflow job for this annotation

GitHub Actions / Lint Dockerfile

DL3019 info: Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages
Expand All @@ -19,24 +18,30 @@ FROM deps AS build-types
COPY shared/types ./shared/types
RUN yarn workspace @shared/types build

FROM deps AS build-cdtn-logger
COPY shared/logger ./shared/logger
RUN yarn workspace @socialgouv/cdtn-logger build

FROM deps AS build-elasticsearch-document-adapter
COPY --from=build-types /app/shared/types ./shared/types
COPY --from=build-cdtn-logger /app/shared/logger ./shared/logger
COPY shared/elasticsearch-document-adapter ./shared/elasticsearch-document-adapter
RUN yarn workspace @shared/elasticsearch-document-adapter build

FROM deps as dist
COPY --from=build-graphql-client /app/shared/graphql-client ./shared/graphql-client
COPY --from=build-types /app/shared/types ./shared/types
COPY --from=build-elasticsearch-document-adapter /app/shared/elasticsearch-document-adapter ./shared/elasticsearch-document-adapter
COPY --from=build-cdtn-logger /app/shared/logger ./shared/logger

COPY shared/eslint-config ./shared/eslint-config/
COPY targets/export-elasticsearch ./targets/export-elasticsearch/

RUN yarn workspace export-elasticsearch build

RUN yarn workspaces focus --production export-elasticsearch && yarn cache clean
RUN mkdir -p /app/targets/export-elasticsearch/node_modules

# app
FROM node:$NODE_VERSION

Check failure on line 45 in targets/export-elasticsearch/Dockerfile

View workflow job for this annotation

GitHub Actions / Lint Dockerfile

DL3026 error: Use only an allowed registry in the FROM image

WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion targets/export-elasticsearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@azure/storage-blob": "^12.9.0",
"@shared/elasticsearch-document-adapter": "workspace:^",
"@shared/graphql-client": "workspace:^",
"@socialgouv/cdtn-logger": "^2.13.0",
"@socialgouv/cdtn-logger": "workspace:^",
"axios": "^0.26.1",
"body-parser": "^1.19.2",
"cors": "^2.8.5",
Expand Down
3,934 changes: 0 additions & 3,934 deletions targets/export-elasticsearch/yarn.lock

This file was deleted.

2 changes: 0 additions & 2 deletions targets/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
ARG NODE_VERSION=20.3.1-alpine

# dist
FROM node:$NODE_VERSION AS deps

WORKDIR /app
Expand Down Expand Up @@ -31,7 +30,6 @@ RUN yarn workspace frontend build
RUN yarn workspaces focus --production frontend && yarn cache clean
RUN mkdir -p targets/frontend/node_modules

# app
FROM node:$NODE_VERSION

WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion targets/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@sentry/node": "^6.12.0",
"@shared/graphql-client": "workspace:^",
"@shared/id-generator": "workspace:^",
"@socialgouv/cdtn-logger": "^2.13.0",
"@socialgouv/cdtn-logger": "workspace:^",
"@socialgouv/cdtn-slugify": "^4.52.1",
"@socialgouv/cdtn-sources": "^4.52.1",
"@socialgouv/cdtn-ui": "^4.92.0",
Expand Down
30 changes: 15 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5066,7 +5066,7 @@ __metadata:
"@elastic/elasticsearch": ^7.14.1
"@shared/eslint-config": "workspace:^"
"@socialgouv/cdtn-elasticsearch": ^2.13.0
"@socialgouv/cdtn-logger": ^2.13.0
"@socialgouv/cdtn-logger": "workspace:^"
"@socialgouv/cdtn-monolog": ^1.5.11
"@socialgouv/cdtn-slugify": ^4.52.1
"@socialgouv/cdtn-sources": ^4.52.1
Expand Down Expand Up @@ -5230,7 +5230,7 @@ __metadata:
"@babel/core": ^7.15.5
"@babel/plugin-transform-modules-commonjs": ^7.15.4
"@shared/eslint-config": "workspace:^"
"@socialgouv/cdtn-logger": ^2.13.0
"@socialgouv/cdtn-logger": "workspace:^"
got: ^11.8.2
jest: ^27.1.1
lint-staged: ^12.0.0
Expand All @@ -5240,7 +5240,16 @@ __metadata:
languageName: unknown
linkType: soft

"@socialgouv/cdtn-logger@^2.13.0, @socialgouv/cdtn-logger@workspace:shared/logger":
"@socialgouv/cdtn-logger@npm:^1.10.4":
version: 1.20.0
resolution: "@socialgouv/cdtn-logger@npm:1.20.0"
dependencies:
winston: ^3.3.3
checksum: eb2e11443550070efdf6b55c19bcaaba173f3e87a65dfe77a5abbca7b10c442bf5731f5c5fc85e0a4c04dd0903fd9d49557da2799b20d8afa99c5003c736829f
languageName: node
linkType: hard

"@socialgouv/cdtn-logger@workspace:^, @socialgouv/cdtn-logger@workspace:shared/logger":
version: 0.0.0-use.local
resolution: "@socialgouv/cdtn-logger@workspace:shared/logger"
dependencies:
Expand All @@ -5256,20 +5265,11 @@ __metadata:
lint-staged: ^12.0.0
prettier: ^2.3.2
std-mocks: ^1.0.1
typescript: ^4.4.3
typescript: ^4.9.5
winston: ^3.3.3
languageName: unknown
linkType: soft

"@socialgouv/cdtn-logger@npm:^1.10.4":
version: 1.20.0
resolution: "@socialgouv/cdtn-logger@npm:1.20.0"
dependencies:
winston: ^3.3.3
checksum: eb2e11443550070efdf6b55c19bcaaba173f3e87a65dfe77a5abbca7b10c442bf5731f5c5fc85e0a4c04dd0903fd9d49557da2799b20d8afa99c5003c736829f
languageName: node
linkType: hard

"@socialgouv/cdtn-monolog@npm:^1.5.11":
version: 1.22.1
resolution: "@socialgouv/cdtn-monolog@npm:1.22.1"
Expand Down Expand Up @@ -12124,7 +12124,7 @@ __metadata:
"@shared/eslint-config": "workspace:^"
"@shared/graphql-client": "workspace:^"
"@shared/types": "workspace:^"
"@socialgouv/cdtn-logger": ^2.13.0
"@socialgouv/cdtn-logger": "workspace:^"
"@swc/cli": 0.1.55
"@swc/core": 1.2.150
"@swc/jest": 0.2.20
Expand Down Expand Up @@ -12619,7 +12619,7 @@ __metadata:
"@shared/graphql-client": "workspace:^"
"@shared/id-generator": "workspace:^"
"@shared/types": "workspace:^"
"@socialgouv/cdtn-logger": ^2.13.0
"@socialgouv/cdtn-logger": "workspace:^"
"@socialgouv/cdtn-slugify": ^4.52.1
"@socialgouv/cdtn-sources": ^4.52.1
"@socialgouv/cdtn-ui": ^4.92.0
Expand Down

0 comments on commit 98cb41e

Please sign in to comment.