Skip to content

Commit

Permalink
feat: use ovh for dev/preprod (#239)
Browse files Browse the repository at this point in the history
* feat: use ovh for dev/preprod

* fix

* fix
  • Loading branch information
Julien Bouquillon authored Aug 9, 2023
1 parent 4a454a4 commit 06d5f49
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 39 deletions.
10 changes: 10 additions & 0 deletions .kontinuous/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
projectName: monsuivipsy
ciNamespace: ci-monsuivipsy

dependencies:
fabrique:
extends:
- name: ovh
ifEnv: [dev, preprod]
- name: buildkit-service
ifEnv: [dev, preprod]
15 changes: 9 additions & 6 deletions .kontinuous/env/dev/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
app:
needs: [db, build-app]
pg:
~chart: pg

jobs:
runs:
db:
use: create-db
app:
needs: [build-app, pg]
envFrom:
- secretRef:
name: "pg-app"
- secretRef:
name: api
11 changes: 10 additions & 1 deletion .kontinuous/env/preprod/values.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
pg:
~chart: pg

app:
host: "api-monsuivipsy-preprod.dev.fabrique.social.gouv.fr"
host: "api-monsuivipsy-preprod.ovh.fabrique.social.gouv.fr"
needs: [build-app, pg]
envFrom:
- secretRef:
name: "pg-app"
- secretRef:
name: api
4 changes: 2 additions & 2 deletions api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine3.16
FROM node:18-bullseye@sha256:f27e3f4c8b5719cb9816084475d687a283c59149f3d11a7aa45b675fea56bed0

ARG PRODUCTION

Expand All @@ -10,7 +10,7 @@ COPY . .

RUN if [ -z "$PRODUCTION" ]; then echo "Copy staging values"; cp .env.staging .env; else cp .env.production .env; fi

RUN yarn --production --frozen-lockfile
RUN yarn --production --frozen-lockfile && yarn cache clean

USER 1000

Expand Down
14 changes: 7 additions & 7 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@
"@slack/webhook": "^6.1.0",
"bcryptjs": "^2.4.3",
"cors": "^2.8.5",
"date-fns": "^2.29.3",
"cross-env": "^7.0.3",
"date-fns": "^2.30.0",
"date-fns-tz": "^1.3.7",
"dotenv": "^16.0.0",
"express": "^4.17.1",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"helmet": "^4.0.0",
"morgan": "^1.10.0",
"node-cron": "^3.0.2",
"node-fetch": "2",
"node-pushnotifications": "^2.0.3"
"node-pushnotifications": "^2.0.3",
"prisma": "^4.4.0"
},
"devDependencies": {
"cross-env": "^7.0.3",
"nodemon": "^2.0.15",
"prisma": "^4.4.0"
"nodemon": "^2.0.15"
},
"engines": {
"npm": "please-use-yarn",
Expand Down
60 changes: 37 additions & 23 deletions api/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
# yarn lockfile v1


"@babel/runtime@^7.21.0":
version "7.22.10"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.10.tgz#ae3e9631fd947cb7e3610d3e9d8fef5f76696682"
integrity sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==
dependencies:
regenerator-runtime "^0.14.0"

"@parse/[email protected]":
version "5.1.3"
resolved "https://registry.yarnpkg.com/@parse/node-apn/-/node-apn-5.1.3.tgz#58cdecf14d872e3183046c58f2cfb87d41afb5e1"
Expand Down Expand Up @@ -267,10 +274,10 @@ bn.js@^4.0.0:
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88"
integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==

[email protected].0:
version "1.20.0"
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.0.tgz#3de69bd89011c11573d7bfee6a64f11b6bd27cc5"
integrity sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==
[email protected].1:
version "1.20.1"
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668"
integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==
dependencies:
bytes "3.1.2"
content-type "~1.0.4"
Expand All @@ -280,7 +287,7 @@ [email protected]:
http-errors "2.0.0"
iconv-lite "0.4.24"
on-finished "2.4.1"
qs "6.10.3"
qs "6.11.0"
raw-body "2.5.1"
type-is "~1.6.18"
unpipe "1.0.0"
Expand Down Expand Up @@ -504,10 +511,12 @@ date-fns-tz@^1.3.7:
resolved "https://registry.yarnpkg.com/date-fns-tz/-/date-fns-tz-1.3.7.tgz#e8e9d2aaceba5f1cc0e677631563081fdcb0e69a"
integrity sha512-1t1b8zyJo+UI8aR+g3iqr5fkUHWpd58VBx8J/ZSQ+w7YrGlw80Ag4sA86qkfCXRBLmMc4I2US+aPMd4uKvwj5g==

date-fns@^2.29.3:
version "2.29.3"
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz#27402d2fc67eb442b511b70bbdf98e6411cd68a8"
integrity sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==
date-fns@^2.30.0:
version "2.30.0"
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0"
integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==
dependencies:
"@babel/runtime" "^7.21.0"

[email protected]:
version "2.6.9"
Expand Down Expand Up @@ -576,10 +585,10 @@ dot-prop@^5.2.0:
dependencies:
is-obj "^2.0.0"

dotenv@^16.0.0:
version "16.0.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.1.tgz#8f8f9d94876c35dac989876a5d3a82a267fdce1d"
integrity sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ==
dotenv@^16.3.1:
version "16.3.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==

duplexer3@^0.1.4:
version "0.1.4"
Expand Down Expand Up @@ -638,14 +647,14 @@ etag@~1.8.1:
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==

express@^4.17.1:
version "4.18.1"
resolved "https://registry.yarnpkg.com/express/-/express-4.18.1.tgz#7797de8b9c72c857b9cd0e14a5eea80666267caf"
integrity sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==
express@^4.18.2:
version "4.18.2"
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
dependencies:
accepts "~1.3.8"
array-flatten "1.1.1"
body-parser "1.20.0"
body-parser "1.20.1"
content-disposition "0.5.4"
content-type "~1.0.4"
cookie "0.5.0"
Expand All @@ -664,7 +673,7 @@ express@^4.17.1:
parseurl "~1.3.3"
path-to-regexp "0.1.7"
proxy-addr "~2.0.7"
qs "6.10.3"
qs "6.11.0"
range-parser "~1.2.1"
safe-buffer "5.2.1"
send "0.18.0"
Expand Down Expand Up @@ -1498,10 +1507,10 @@ pupa@^2.1.1:
dependencies:
escape-goat "^2.0.0"

qs@6.10.3:
version "6.10.3"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e"
integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==
qs@6.11.0:
version "6.11.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a"
integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==
dependencies:
side-channel "^1.0.4"

Expand Down Expand Up @@ -1547,6 +1556,11 @@ readdirp@~3.6.0:
dependencies:
picomatch "^2.2.1"

regenerator-runtime@^0.14.0:
version "0.14.0"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45"
integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==

registry-auth-token@^4.0.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.1.tgz#6d7b4006441918972ccd5fedcd41dc322c79b250"
Expand Down

0 comments on commit 06d5f49

Please sign in to comment.