Skip to content

Commit

Permalink
wip deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
matmut7 committed Jun 6, 2024
1 parent c87ad38 commit a1c4693
Show file tree
Hide file tree
Showing 16 changed files with 2,288 additions and 2,225 deletions.
10 changes: 0 additions & 10 deletions .dockerignore

This file was deleted.

6 changes: 0 additions & 6 deletions .kontinuous/config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
projectName: ozensemble
ciNamespace: ci-ozensemble

dependencies:
fabrique:
extends:
- name: ovh
- name: buildkit-service
55 changes: 50 additions & 5 deletions .kontinuous/values.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,53 @@
app:
securityContext:
fsGroup: 101
runAsGroup: 101
runAsUser: 101
next-app:
~chart: app
~needs: ["build-next-app"]
imagePackage: next-app
envFrom:
- secretRef:
name: api

pg:
~chart: pg

api:
~chart: app
~needs: ["build-api"]
imagePackage: api
containerPort: "1337"
envFrom:
- secretRef:
name: pg-app
vars:
DATABASE_CLIENT: postgres
DATABASE_HOST: "$(PGHOST)"
DATABASE_PORT: "$(PGPORT)"
DATABASE_NAME: "$(PGDATABASE)"
DATABASE_USERNAME: "$(PGUSER)"
DATABASE_PASSWORD: "$(PGPASSWORD)"
DATABASE_SSL: "$(PGSSLMODE)"
HOST: "0.0.0.0"
PORT: "1337"

jobs:
runs:
build-next-app:
~needs: ["api"]
use: build
with:
context: ./next-app
imagePackage: next-app
buildArgs:
NEXT_PUBLIC_STRAPI_API_TOKEN: tata
NEXT_PUBLIC_STRAPI_API_URL: "https://strapi-{{ .Values.global.host}}"

build-api:
use: build
with:
imagePackage: api
context: ./api
buildArgs:
APP_KEYS: tata
API_TOKEN_SALT: tata
ADMIN_JWT_SECRET: tata
TRANSFER_TOKEN_SALT: tata
JWT_SECRET: tata
Empty file removed .socialgouv.yaml
Empty file.
893 changes: 0 additions & 893 deletions .yarn/releases/yarn-4.0.2.cjs

This file was deleted.

8 changes: 8 additions & 0 deletions api/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.dockerignore
node_modules
Dockerfile
build
.strapi
.tmp
.env
.strapi-update.json
File renamed without changes.
894 changes: 894 additions & 0 deletions api/.yarn/releases/yarn-4.2.2.cjs

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions .yarnrc.yml → api/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
nodeLinker: node-modules

plugins:
- checksum: 240d225dd5bf1e25068497140ced7a3b7658a4c3754c08ea57162c9fe3335d757af0eae55555f96150a3015cdd0337852401f3fae69c1edd05221cb32f038d8c
path: .yarn/plugins/@yarnpkg/plugin-fetch.cjs
spec: "https://codeberg.org/devthefuture/yarn-plugin-fetch/raw/branch/master/bundles/@yarnpkg/plugin-fetch.js"

yarnPath: .yarn/releases/yarn-4.0.2.cjs
yarnPath: .yarn/releases/yarn-4.2.2.cjs
27 changes: 27 additions & 0 deletions api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM node:20 as builder
WORKDIR /app
ENV NODE_ENV=production

COPY yarn.lock .yarnrc.yml ./
COPY .yarn .yarn
RUN yarn fetch --immutable

COPY . .

RUN yarn build && \
yarn workspaces focus --all --production

FROM node:20 as runner
WORKDIR /app
ENV NODE_ENV=production

COPY --chown=node:node .yarnrc.yml package.json yarn.lock ./
COPY --chown=node:node .yarn .yarn
COPY --chown=node:node public ./public
COPY --from=builder --chown=node:node /app/node_modules ./node_modules
COPY --from=builder --chown=node:node /app/build ./build
COPY --from=builder --chown=node:node /app/.strapi ./strapi

USER 1000

CMD [ "yarn", "start" ]
3 changes: 2 additions & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@
},
"strapi": {
"uuid": "d2ae4cae-6864-48e2-ae15-15608fd2cf86"
}
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit a1c4693

Please sign in to comment.