From 92b4962da222d04c0aa81049413a6dcf0d28b40a Mon Sep 17 00:00:00 2001 From: Bruno Perel Date: Sun, 8 Sep 2024 00:59:44 +0200 Subject: [PATCH] Migrate to monorepo deploy --- .github/workflows/deploy-ducksmanager.yml | 101 -------------------- .github/workflows/deploy-edgecreator.yml | 110 ---------------------- .github/workflows/deploy.yml | 70 ++++++++++++++ apps/duck-estimator/duck-estimator-db | 1 + apps/web/Dockerfile | 51 +--------- apps/web/docker-compose.yml | 77 +-------------- apps/web/package.json | 6 +- package.json | 2 +- packages/api/Dockerfile | 13 +++ packages/api/docker-compose.yml | 41 +++++++- packages/api/package.json | 4 + packages/prisma-clients/package.json | 3 +- pnpm-lock.yaml | 58 ++++++------ turbo.json | 37 +++++++- 14 files changed, 205 insertions(+), 369 deletions(-) delete mode 100644 .github/workflows/deploy-ducksmanager.yml delete mode 100644 .github/workflows/deploy-edgecreator.yml create mode 100644 .github/workflows/deploy.yml create mode 160000 apps/duck-estimator/duck-estimator-db create mode 100644 packages/api/Dockerfile diff --git a/.github/workflows/deploy-ducksmanager.yml b/.github/workflows/deploy-ducksmanager.yml deleted file mode 100644 index 477ac3163..000000000 --- a/.github/workflows/deploy-ducksmanager.yml +++ /dev/null @@ -1,101 +0,0 @@ -name: deploy-ducksmanager - -on: - workflow_dispatch: - push: - branches: - - "legacy" -jobs: - deploy-dm: - runs-on: ubuntu-latest - environment: production - steps: - - uses: oven-sh/setup-bun@v1 - - name: Check out repository - uses: actions/checkout@master - with: - submodules: recursive - - - name: Download web .env file - uses: nicklasfrahm/scp-action@main - with: - direction: download - host: ${{ secrets.PRODUCTION_SSH_HOST }} - fingerprint: ${{ secrets.PRODUCTION_SSH_FINGERPRINT }} - username: ${{ secrets.PRODUCTION_SSH_USER }} - key: ${{ secrets.PRODUCTION_SSH_KEY }} - source: /home/bperel/workspace/DucksManager2/apps/web/.env.prod.local - target: apps/web/.env - - - name: Download api .env file - uses: nicklasfrahm/scp-action@main - with: - direction: download - host: ${{ secrets.PRODUCTION_SSH_HOST }} - fingerprint: ${{ secrets.PRODUCTION_SSH_FINGERPRINT }} - username: ${{ secrets.PRODUCTION_SSH_USER }} - key: ${{ secrets.PRODUCTION_SSH_KEY }} - source: /home/bperel/workspace/DucksManager2/packages/api/.env - target: packages/api/.env - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: bperel - password: ${{ secrets.DOCKER_REGISTRY_TOKEN_DM }} - - - name: Build and push web - uses: docker/build-push-action@v5 - with: - context: . - file: apps/web/Dockerfile - platforms: linux/x86_64 - push: true - target: web - cache-from: type=registry,ref=ghcr.io/bperel/ducksmanager-web:buildcache - cache-to: type=registry,ref=ghcr.io/bperel/ducksmanager-web:buildcache,mode=max - tags: | - ghcr.io/bperel/ducksmanager-web:latest - - - name: Build and push api - uses: docker/build-push-action@v5 - with: - context: . - file: apps/web/Dockerfile - platforms: linux/x86_64 - push: true - target: api - cache-from: type=registry,ref=ghcr.io/bperel/ducksmanager-api:buildcache - cache-to: type=registry,ref=ghcr.io/bperel/ducksmanager-api:buildcache,mode=max - tags: | - ghcr.io/bperel/ducksmanager-api:latest - - - name: Upload docker-compose.yml file - uses: nicklasfrahm/scp-action@v1.0.1 - with: - direction: upload - host: ${{ secrets.PRODUCTION_SSH_HOST }} - fingerprint: ${{ secrets.PRODUCTION_SSH_FINGERPRINT }} - username: ${{ secrets.PRODUCTION_SSH_USER }} - key: ${{ secrets.PRODUCTION_SSH_KEY }} - source: apps/web/docker-compose.yml - target: /home/bperel/workspace/DucksManager2/docker-compose.yml - - - name: Recreate container - uses: appleboy/ssh-action@v1.0.0 - env: - DOCKER_REGISTRY_TOKEN: ${{ secrets.DOCKER_REGISTRY_TOKEN_DM }} - with: - host: ${{ secrets.PRODUCTION_SSH_HOST }} - username: ${{ secrets.PRODUCTION_SSH_USER }} - key: ${{ secrets.PRODUCTION_SSH_KEY }} - command_timeout: 2m - envs: DOCKER_REGISTRY_TOKEN_DM - script: | - cd workspace/DucksManager2 - echo `grep GITHUB_TOKEN .env | cut -d'=' -f2` | docker login ghcr.io -u bperel --password-stdin - docker compose pull && docker compose up -d --force-recreate web api sentry-relay diff --git a/.github/workflows/deploy-edgecreator.yml b/.github/workflows/deploy-edgecreator.yml deleted file mode 100644 index fcb84505c..000000000 --- a/.github/workflows/deploy-edgecreator.yml +++ /dev/null @@ -1,110 +0,0 @@ -name: deploy-edgecreator - -on: - workflow_dispatch: - push: - branches: - - "legacy" -jobs: - deploy: - runs-on: ubuntu-latest - environment: production - steps: - - uses: oven-sh/setup-bun@v1 - - name: Check out repository - uses: actions/checkout@master - - - name: Download .env file - uses: nicklasfrahm/scp-action@main - with: - direction: download - host: ${{ secrets.PRODUCTION_SSH_HOST }} - fingerprint: ${{ secrets.PRODUCTION_SSH_FINGERPRINT }} - username: ${{ secrets.PRODUCTION_SSH_USER }} - key: ${{ secrets.PRODUCTION_SSH_KEY }} - source: /home/bperel/workspace/EdgeCreator2/.env.prod - target: apps/edgecreator/.env.prod - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2.1.0 - with: - registry: ghcr.io - username: bperel - password: ${{ secrets.DOCKER_REGISTRY_TOKEN_DM }} - - - name: Build and push app - uses: docker/build-push-action@v3 - with: - context: . - file: apps/edgecreator/Dockerfile - platforms: linux/x86_64 - push: true - target: app - cache-from: type=registry,ref=ghcr.io/bperel/edgecreator-app:buildcache - cache-to: type=registry,ref=ghcr.io/bperel/edgecreator-app:buildcache,mode=max - tags: | - ghcr.io/bperel/edgecreator-app:latest - - - name: Build and push api - uses: docker/build-push-action@v3 - with: - context: . - file: apps/edgecreator/Dockerfile - platforms: linux/x86_64 - push: true - target: api - cache-from: type=registry,ref=ghcr.io/bperel/edgecreator-api:buildcache - cache-to: type=registry,ref=ghcr.io/bperel/edgecreator-api:buildcache,mode=max - tags: | - ghcr.io/bperel/edgecreator-api:latest - - - name: Upload docker-compose.yml config - uses: nicklasfrahm/scp-action@v1.0.1 - with: - direction: upload - host: ${{ secrets.PRODUCTION_SSH_HOST }} - fingerprint: ${{ secrets.PRODUCTION_SSH_FINGERPRINT }} - username: ${{ secrets.PRODUCTION_SSH_USER }} - key: ${{ secrets.PRODUCTION_SSH_KEY }} - source: docker-compose.yml - target: /home/bperel/workspace/EdgeCreator2/docker-compose.yml - - - name: Upload Sentry config - uses: nicklasfrahm/scp-action@v1.0.1 - with: - direction: upload - host: ${{ secrets.PRODUCTION_SSH_HOST }} - fingerprint: ${{ secrets.PRODUCTION_SSH_FINGERPRINT }} - username: ${{ secrets.PRODUCTION_SSH_USER }} - key: ${{ secrets.PRODUCTION_SSH_KEY }} - source: config/sentry-relay/config.yml - target: /home/bperel/workspace/EdgeCreator2/config/sentry-relay/config.yml - - - name: Upload Sentry project config - uses: nicklasfrahm/scp-action@v1.0.1 - with: - direction: upload - host: ${{ secrets.PRODUCTION_SSH_HOST }} - fingerprint: ${{ secrets.PRODUCTION_SSH_FINGERPRINT }} - username: ${{ secrets.PRODUCTION_SSH_USER }} - key: ${{ secrets.PRODUCTION_SSH_KEY }} - source: config/sentry-relay/projects/5595460.json - target: /home/bperel/workspace/EdgeCreator2/config/sentry-relay/projects/5595460.json - - - name: Recreate container - uses: appleboy/ssh-action@v0.1.7 - env: - DOCKER_REGISTRY_TOKEN: ${{ secrets.DOCKER_REGISTRY_TOKEN_DM }} - with: - host: ${{ secrets.PRODUCTION_SSH_HOST }} - username: ${{ secrets.PRODUCTION_SSH_USER }} - key: ${{ secrets.PRODUCTION_SSH_KEY }} - command_timeout: 2m - envs: DOCKER_REGISTRY_TOKEN - script: | - cd workspace/EdgeCreator2 - echo $DOCKER_REGISTRY_TOKEN | docker login ghcr.io -u bperel --password-stdin - docker compose pull && docker compose up -d --force-recreate diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..08c30c9ed --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,70 @@ +name: deploy + +on: + workflow_dispatch: + push: + branches: + - "legacy" +jobs: + build: + runs-on: ubuntu-latest + environment: production + env: + REMOTE_ROOT: workspace/DucksManager2 + PRODUCTION_SSH_HOST: ${{ secrets.PRODUCTION_SSH_HOST }} + PRODUCTION_SSH_USER: ${{ secrets.PRODUCTION_SSH_USER }} + PRODUCTION_SSH_KEY: ${{ secrets.PRODUCTION_SSH_KEY }} + name: deploy + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Log in to the Container registry + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + with: + registry: ghcr.io + username: bperel + password: ${{ secrets.DOCKER_REGISTRY_TOKEN_DM }} + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9.8.0 + + - name: Use Node.js 18 + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: "pnpm" + + - uses: oven-sh/setup-bun@v1 + + - name: Install dependencies + run: | + pnpm -r i + + - name: Build apps + run: | + pnpm i -g turbo + turbo -F '~web...' -F '~api...' build + + - name: Retrieve pre-build files + run: | + turbo -F '~web...' -F '~api...' prod:transfer-files-pre + + - uses: docker/setup-buildx-action@v3 + + - name: Build and push Docker images + env: + GITHUB_TOKEN: ${{ github.token }} + run: | + turbo -F -F '~web...' -F '~api...' prod:build-docker + + - name: Send post-build files + run: | + turbo -F '~web...' -F '~api...' prod:transfer-files-post + + - name: Deploy + run: | + turbo -F '~web...' -F '~api...' prod:deploy diff --git a/apps/duck-estimator/duck-estimator-db b/apps/duck-estimator/duck-estimator-db new file mode 160000 index 000000000..2aa53cede --- /dev/null +++ b/apps/duck-estimator/duck-estimator-db @@ -0,0 +1 @@ +Subproject commit 2aa53cededd52f7d815d2bd27b2eaf676710dce3 diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index 54c4cc405..5a32af141 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -1,52 +1,5 @@ -FROM node:18.20 AS pnpm - -ENV PNPM_HOME="/pnpm" -ENV PATH="$PNPM_HOME:$PATH" -RUN corepack enable - -FROM pnpm AS build - -WORKDIR /app -COPY . ./ -RUN curl -fsSL https://bun.sh/install | bash -RUN --mount=type=cache,id=pnpm-store-web,target=/app/.pnpm-store \ - pnpm -r -F ~web... -F ~api... i - -RUN pnpm -r -F ~web... -F ~api... run build - -FROM nginx AS web +FROM nginx LABEL org.opencontainers.image.authors="Bruno Perel" COPY apps/web/nginx.conf /etc/nginx/nginx.conf -COPY --from=build /app/apps/web/dist /usr/share/nginx/html - - -FROM pnpm AS api -LABEL org.opencontainers.image.authors="Bruno Perel" - -WORKDIR /app - -COPY package.json ./ -COPY pnpm-*.yaml ./ - -COPY --from=build /app/packages/prisma-clients ./packages/prisma-clients -COPY --from=build /app/packages/types ./packages/types -COPY --from=build /app/packages/prisma-clients/dist/ ./packages/prisma-clients -COPY --from=build /app/packages/types/dist/ ./packages/types -COPY --from=build /app/packages/api/dist/api ./packages/api - -COPY packages/api/package.json ./packages/api -COPY packages/api/translations ./packages/api/translations -COPY packages/api/emails ./packages/api/emails -COPY packages/api/scripts ./packages/api/scripts - -RUN --mount=type=cache,id=pnpm-store,target=/app/.pnpm-store \ - pnpm i --production - -COPY ./packages/api/routes/demo/*.csv ./routes/demo/ -COPY ./packages/api/emails ./emails/ -COPY ./packages/api/.env ./.env - -EXPOSE 3000 - -CMD ["node", "packages/api/index.js"] +COPY apps/web/dist /usr/share/nginx/html \ No newline at end of file diff --git a/apps/web/docker-compose.yml b/apps/web/docker-compose.yml index cbde320d6..833bd3f4a 100644 --- a/apps/web/docker-compose.yml +++ b/apps/web/docker-compose.yml @@ -1,83 +1,20 @@ -version: '3.8' +version: "3.8" services: web: container_name: ducksmanager-web image: ghcr.io/bperel/ducksmanager-web - depends_on: - - api restart: always networks: - public-network - dm2-network - api: - container_name: ducksmanager-api - image: ghcr.io/bperel/ducksmanager-api + web-websocket: + container_name: ducksmanager-web-websocket + image: ghcr.io/bperel/ducksmanager-web:websocket restart: always networks: - public-network - dm2-network - - dm-server_db-network - - dm-server_cover-id-network - - coa-updater: - container_name: coa-updater - image: bperel/coa-updater - #depends_on: - # - db - environment: - MYSQL_HOST: db - MYSQL_DATABASE: coa - MYSQL_DATABASE_NEW: coa_new - MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} - networks: - - dm-server_db-network - - cover-updater: - container_name: cover-updater - image: bperel/duck-cover-id-updater - # depends_on: - # - db - environment: - MYSQL_COVER_INFO_HOST: db - MYSQL_COVER_INFO_PASSWORD: ${MYSQL_ROOT_PASSWORD} - MYSQL_COVER_INFO_DATABASE: cover_info - MYSQL_COA_HOST: db - MYSQL_COA_PASSWORD: ${MYSQL_ROOT_PASSWORD} - MYSQL_COA_DATABASE: coa - PASTEC_HOST: pastec - PASTEC_PORT: 4212 - PASTEC_CONTAINER_HOME: /pastec/build - networks: - - dm-server_db-network - - dm-server_cover-id-network - - stats-updater: - container_name: stats-updater - image: bperel/dm-stats-updater - # depends_on: - # - db - environment: - MYSQL_COA_HOST: db - MYSQL_COA_DATABASE: coa - MYSQL_DM_STATS_HOST: db - MYSQL_DM_STATS_DATABASE: dm_stats - MYSQL_DM_HOST: db - MYSQL_DM_DATABASE: dm - MYSQL_PASSWORD: ${MYSQL_ROOT_PASSWORD} - networks: - - dm-server_db-network - - sprite-names-updater: - container_name: sprite-names-updater - image: mariadb:10.7 - # depends_on: - # - db - environment: - MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} - command: mysql -uroot -p${MYSQL_ROOT_PASSWORD} dm -e "CALL generate_sprite_names" - networks: - - dm-server_db-network sentry-relay: image: getsentry/relay @@ -91,8 +28,4 @@ services: networks: dm2-network: public-network: - external: true - dm-server_db-network: - external: true - dm-server_cover-id-network: - external: true + external: true \ No newline at end of file diff --git a/apps/web/package.json b/apps/web/package.json index bebf4e4de..43625c876 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -14,7 +14,11 @@ "story:dev": "histoire dev", "test": "vitest", "typecheck": "vue-tsc --noEmit", - "wait": "wait-on tcp:8001" + "wait": "wait-on tcp:8001", + "prod:deploy": "DIR=. SERVICES='web-websocket' pnpm -F '~ci' prod:docker-compose-up", + "prod:build-docker": "REPO_NAME=ghcr.io/bperel/ducksmanager-web pnpm -F '~ci' prod:build-docker -f apps/web/Dockerfile", + "prod:transfer-files-pre": "pnpm -F '~ci' prod:transfer-files @apps/web/.env.prod.legacy:apps/web/.env @packages/prisma-clients/.env.prod.local:packages/prisma-schemas/.env", + "prod:transfer-files-post": "pnpm -F '~ci' prod:transfer-files apps/web/docker-compose.yml:@docker-compose.yml" }, "dependencies": { "@bperel/vue3-popper-teleport": "^1.4.3", diff --git a/package.json b/package.json index ab909b57c..28ac87207 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "husky": "^9.0.11" }, "devDependencies": { - "turbo": "^2.0.4" + "turbo": "^2.1.1" }, "scripts": { "prepare": "husky install", diff --git a/packages/api/Dockerfile b/packages/api/Dockerfile new file mode 100644 index 000000000..7b5781e8c --- /dev/null +++ b/packages/api/Dockerfile @@ -0,0 +1,13 @@ +FROM node:18-slim +LABEL org.opencontainers.image.authors="Bruno Perel" + +WORKDIR /app + +RUN apt-get update && apt-get install -y openssl && apt-get clean && rm -rf /var/lib/apt/lists/* +COPY packages/prisma-schemas/client_dm/libquery_engine-debian-openssl-3.0.x.so.node /tmp/prisma-engines/ + +COPY packages/api/.env /app/ +COPY packages/api/bundle.mjs /app/ + +EXPOSE 3000 +CMD ["node", "bundle.mjs"] \ No newline at end of file diff --git a/packages/api/docker-compose.yml b/packages/api/docker-compose.yml index c79b30b69..6c37ca9ce 100644 --- a/packages/api/docker-compose.yml +++ b/packages/api/docker-compose.yml @@ -1,4 +1,4 @@ -version: '2.4' +version: "3.8" services: api: container_name: ducksmanager-api @@ -10,10 +10,49 @@ services: - dm-server_db-network - dm-server_cover-id-network + api-websocket: + container_name: ducksmanager-api-websocket + image: ghcr.io/bperel/ducksmanager-api:websocket + restart: always + networks: + - public-network + - dm2-network + - dm-server_db-network + - dm-server_cover-id-network + + cover-updater: + container_name: cover-updater + image: bperel/duck-cover-id-updater + environment: + MYSQL_COVER_INFO_HOST: db + MYSQL_COVER_INFO_PASSWORD: ${MYSQL_ROOT_PASSWORD} + MYSQL_COVER_INFO_DATABASE: cover_info + MYSQL_COA_HOST: db + MYSQL_COA_PASSWORD: ${MYSQL_ROOT_PASSWORD} + MYSQL_COA_DATABASE: coa + PASTEC_HOST: pastec + PASTEC_PORT: 4212 + PASTEC_CONTAINER_HOME: /pastec/build + networks: + - dm-server_db-network + - dm-server_cover-id-network + + sprite-names-updater: + container_name: sprite-names-updater + image: mariadb:11.4 + environment: + MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} + command: mariadb -uroot -p${MYSQL_ROOT_PASSWORD} -h db dm -e "CALL generate_sprite_names" + networks: + - dm-server_db-network + - ducksmanager_dm-network + networks: dm2-network: public-network: external: true + ducksmanager_dm-network: + external: true dm-server_db-network: external: true dm-server_cover-id-network: diff --git a/packages/api/package.json b/packages/api/package.json index 4720e1983..654d8f5b7 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -8,6 +8,10 @@ "build": "bun build --target node --sourcemap index.ts --outfile bundle.mjs", "dev": "concurrently -n api,docker-compose,db \"pnpm -F ~api nodemon-watch\" \"docker compose -f docker-compose-dev.yml up pastec mailcatcher\" \"pnpm -F ~prisma-clients dev\"", "nodemon-watch": "concurrently -n nodemon,tsc \"bun --inspect run --hot index.ts\" \"tsc --noEmit --watch\"", + "prod:deploy": "DIR=packages/api SERVICES=api-websocket pnpm -F '~ci' prod:docker-compose-up", + "prod:build-docker": "REPO_NAME=ghcr.io/bperel/ducksmanager-api pnpm -F '~ci' prod:build-docker -f packages/api/Dockerfile", + "prod:transfer-files-pre": "pnpm -F '~ci' prod:transfer-files @packages/api/.env:packages/api/.env @packages/prisma-clients/.env.prod.local:packages/prisma-schemas/.env", + "prod:transfer-files-post": "pnpm -F '~ci' prod:transfer-files packages/api/docker-compose.yml:@packages/api/docker-compose.yml", "lint": "eslint --fix .", "wait": "wait-on tcp:3000" }, diff --git a/packages/prisma-clients/package.json b/packages/prisma-clients/package.json index c63de8e1c..7f1ad8705 100644 --- a/packages/prisma-clients/package.json +++ b/packages/prisma-clients/package.json @@ -7,8 +7,7 @@ "scripts": { "prisma:pull": "ls schemas/*.prisma | while read -r schema; do pnpx prisma db pull --schema=$schema; done", "dev": "docker compose -f docker-compose-dev.yml up --force-recreate -d && bash wait-until-db-ready.bash", - "generate": "ls schemas/*.prisma | while read -r schema; do pnpx prisma generate --schema=$schema; done && rm -rf dist", - "build": "pnpm run generate && tsc" + "prisma-generate-all": "ls schemas/*.prisma | while read -r schema; do pnpx prisma generate --schema=$schema; done && rm -rf dist" }, "dependencies": { "@prisma/client": "^5.19.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2b072c181..58977d336 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,8 +13,8 @@ importers: version: 9.0.11 devDependencies: turbo: - specifier: ^2.0.4 - version: 2.0.4 + specifier: ^2.1.1 + version: 2.1.1 packages: @@ -23,67 +23,67 @@ packages: engines: {node: '>=18'} hasBin: true - turbo-darwin-64@2.0.4: - resolution: {integrity: sha512-x9mvmh4wudBstML8Z8IOmokLWglIhSfhQwnh2gBCSqabgVBKYvzl8Y+i+UCNPxheCGTgtsPepTcIaKBIyFIcvw==} + turbo-darwin-64@2.1.1: + resolution: {integrity: sha512-aYNuJpZlCoi0Htd79fl/2DywpewGKijdXeOfg9KzNuPVKzSMYlAXuAlNGh0MKjiOcyqxQGL7Mq9LFhwA0VpDpQ==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.0.4: - resolution: {integrity: sha512-/B1Ih8zPRGVw5vw4SlclOf3C/woJ/2T6ieH6u54KT4wypoaVyaiyMqBcziIXycdObIYr7jQ+raHO7q3mhay9/A==} + turbo-darwin-arm64@2.1.1: + resolution: {integrity: sha512-tifJKD8yHY48rHXPMcM8o1jI/Jk2KCaXiNjTKvvy9Zsim61BZksNVLelIbrRoCGwAN6PUBZO2lGU5iL/TQJ5Pw==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.0.4: - resolution: {integrity: sha512-6aG670e5zOWu6RczEYcB81nEl8EhiGJEvWhUrnAfNEUIMBEH1pR5SsMmG2ol5/m3PgiRM12r13dSqTxCLcHrVg==} + turbo-linux-64@2.1.1: + resolution: {integrity: sha512-Js6d/bSQe9DuV9c7ITXYpsU/ADzFHABdz1UIHa7Oqjj9VOEbFeA9WpAn0c+mdJrVD+IXJFbbDZUjN7VYssmtcg==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.0.4: - resolution: {integrity: sha512-AXfVOjst+mCtPDFT4tCu08Qrfv12Nj7NDd33AjGwV79NYN1Y1rcFY59UQ4nO3ij3rbcvV71Xc+TZJ4csEvRCSg==} + turbo-linux-arm64@2.1.1: + resolution: {integrity: sha512-LidzTCq0yvQ+N8w8Qub9FmhQ/mmEIeoqFi7DSupekEV2EjvE9jw/zYc9Pk67X+g7dHVfgOnvVzmrjChdxpFePw==} cpu: [arm64] os: [linux] - turbo-windows-64@2.0.4: - resolution: {integrity: sha512-QOnUR9hKl0T5gq5h1fAhVEqBSjpcBi/BbaO71YGQNgsr6pAnCQdbG8/r3MYXet53efM0KTdOhieWeO3KLNKybA==} + turbo-windows-64@2.1.1: + resolution: {integrity: sha512-GKc9ZywKwy4xLDhwXd6H07yzl0TB52HjXMrFLyHGhCVnf/w0oq4sLJv2sjbvuarPjsyx4xnCBJ3m3oyL2XmFtA==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.0.4: - resolution: {integrity: sha512-3v8WpdZy1AxZw0gha0q3caZmm+0gveBQ40OspD6mxDBIS+oBtO5CkxhIXkFJJW+jDKmDlM7wXDIGfMEq+QyNCQ==} + turbo-windows-arm64@2.1.1: + resolution: {integrity: sha512-oFKkMj11KKUv3xSK9/fhAEQTxLUp1Ol1EOktwc32+SFtEU0uls7kosAz0b+qe8k3pJGEMFdDPdqoEjyJidbxtQ==} cpu: [arm64] os: [win32] - turbo@2.0.4: - resolution: {integrity: sha512-Ilme/2Q5kYw0AeRr+aw3s02+WrEYaY7U8vPnqSZU/jaDG/qd6jHVN6nRWyd/9KXvJGYM69vE6JImoGoyNjLwaw==} + turbo@2.1.1: + resolution: {integrity: sha512-u9gUDkmR9dFS8b5kAYqIETK4OnzsS4l2ragJ0+soSMHh6VEeNHjTfSjk1tKxCqLyziCrPogadxP680J+v6yGHw==} hasBin: true snapshots: husky@9.0.11: {} - turbo-darwin-64@2.0.4: + turbo-darwin-64@2.1.1: optional: true - turbo-darwin-arm64@2.0.4: + turbo-darwin-arm64@2.1.1: optional: true - turbo-linux-64@2.0.4: + turbo-linux-64@2.1.1: optional: true - turbo-linux-arm64@2.0.4: + turbo-linux-arm64@2.1.1: optional: true - turbo-windows-64@2.0.4: + turbo-windows-64@2.1.1: optional: true - turbo-windows-arm64@2.0.4: + turbo-windows-arm64@2.1.1: optional: true - turbo@2.0.4: + turbo@2.1.1: optionalDependencies: - turbo-darwin-64: 2.0.4 - turbo-darwin-arm64: 2.0.4 - turbo-linux-64: 2.0.4 - turbo-linux-arm64: 2.0.4 - turbo-windows-64: 2.0.4 - turbo-windows-arm64: 2.0.4 + turbo-darwin-64: 2.1.1 + turbo-darwin-arm64: 2.1.1 + turbo-linux-64: 2.1.1 + turbo-linux-arm64: 2.1.1 + turbo-windows-64: 2.1.1 + turbo-windows-arm64: 2.1.1 diff --git a/turbo.json b/turbo.json index 4b2cbf9ef..92d3aa1c5 100644 --- a/turbo.json +++ b/turbo.json @@ -1,8 +1,10 @@ { "$schema": "https://turborepo.org/schema.json", + "ui": "tui", "tasks": { "prisma-pull-generate": {}, - "prisma-generate": { + "lint": {}, + "prisma-generate-all": { "cache": false }, "wait": { @@ -10,17 +12,46 @@ }, "build": { "dependsOn": [ - "prisma-generate", + "prisma-generate-all", "^build" ], "outputs": [ "dist/**" ] }, + "prod:build-docker": { + "passThroughEnv": [ + "REPO_NAME" + ] + }, + "prod:deploy": { + "passThroughEnv": [ + "REMOTE_ROOT", + "PRODUCTION_SSH_HOST", + "PRODUCTION_SSH_USER", + "PRODUCTION_SSH_KEY" + ] + }, + "prod:transfer-files-pre": { + "passThroughEnv": [ + "REMOTE_ROOT", + "PRODUCTION_SSH_HOST", + "PRODUCTION_SSH_USER", + "PRODUCTION_SSH_KEY" + ] + }, + "prod:transfer-files-post": { + "passThroughEnv": [ + "REMOTE_ROOT", + "PRODUCTION_SSH_HOST", + "PRODUCTION_SSH_USER", + "PRODUCTION_SSH_KEY" + ] + }, "dev": { "persistent": true, "dependsOn": [ - "prisma-generate", + "prisma-generate-all", "^wait" ] }