GitFOSS
7506cc5 (parent dcaf526)12/10/2023, 12:16:03 AM
make it work in december 2023
+ 42
- 31
@@ -1,3 +1,4 @@
 {
-    "typescript.tsdk": "node_modules/typescript/lib"
-}
+  "typescript.tsdk": "node_modules/typescript/lib",
+  "git-blame.gitWebUrl": ""
+}

@@ -1,6 +1,8 @@
 FROM node:alpine as builder
 
 ENV NODE_ENV=development
+ENV NODE_OPTIONS=--openssl-legacy-provider
+
 ARG PORT=4100
 ENV PORT=${PORT}
 ARG HOST="0.0.0.0"

...
@@ -16,8 +18,11 @@ COPY ./tsconfig.json       /usr/src/app/tsconfig.json
 COPY ./yarn.lock           /usr/src/app/yarn.lock
 
 # Install dependencies
+RUN apk upgrade --no-cache openssl
 RUN yarn install
 
+#    [local tree]          [builder tree]
+
 COPY ./.git                /usr/src/app/.git
 COPY ./app                 /usr/src/app/app
 COPY ./db                  /usr/src/app/db

...
@@ -32,6 +37,7 @@ COPY ./ReadMe.md           /usr/src/app/ReadMe.md
 COPY ./LICENSE             /usr/src/app/LICENSE
 
 ENV NODE_ENV=production
+ENV NODE_OPTIONS=--openssl-legacy-provider
 
 RUN yarn generate:prisma   # Generate Prisma Client from schema (db/schema.prisma)
 RUN yarn typecheck         # Validate TS types are valid first

...
@@ -40,19 +46,23 @@ RUN yarn clean             # Cleanup working dir
 RUN yarn build:ts          # Transpile TypeScript to JavaScript (node)
 RUN yarn bundle:islands    # Bundle Islands (react-monolith) to ESM/CJS/UMD
 
+#    [local tree]          [builder tree]
+
 COPY ./public              /usr/src/app/public
 COPY ./app.manifest.json   /usr/src/app/app.manifest.json
 
 FROM node:slim as base
 
 ENV NODE_ENV=production
+ENV NODE_OPTIONS=--openssl-legacy-provider
+
 ARG PORT=4100
 ENV PORT=${PORT}
 ARG HOST="0.0.0.0"
 ENV HOST=${HOST}
 
 RUN apt-get update && \
-    apt-get install git -y --no-install-recommends && \
+    apt-get install -y --no-install-recommends git openssl && \
     rm -rf /var/lib/apt/lists/*
 
 WORKDIR /app

app/islands/RepositoryTreeView.tsx
@@ -10,7 +10,8 @@ import type {
   WithThemeSchemeProp,
 } from "../types";
 import { AppRoute } from "../routes.defs";
-import { Grid, TextEllipsis } from "../components";
+import { Grid } from "../components/Grid";
+import { TextEllipsis } from "../components/TextEllipsis.styled";
 import { NamedColors } from "../utils/style";
 import { buildRouteLink } from "../utils/shared";
 // app islands

@@ -1,7 +1,7 @@
 generator client {
   provider        = "prisma-client-js"
   previewFeatures = ["fullTextSearch", "interactiveTransactions", "orderByNulls"]
-  binaryTargets   = ["native", "linux-musl", "debian-openssl-1.1.x"]
+  binaryTargets   = ["native", "linux-musl", "debian-openssl-1.1.x", "debian-openssl-3.0.x"]
 }
 
 datasource db {

@@ -1,34 +1,33 @@
 version: "3"
 services:
-  db:
+  gitfoss_db:
     container_name: gitfoss_db
     image: postgres:14
     environment:
       - POSTGRES_PASSWORD=postgres
-      - POSTGRES_DB=gitfoss7
-    network_mode: host
+      - POSTGRES_DB=postgres
     ports:
       - 5432:5432
     volumes:
       - ./data/postgres_data:/var/lib/postgresql/data
-  # web:
-  #   build:
-  #     context: .
-  #     dockerfile: Dockerfile
-  #     args:
-  #       - HOST=0.0.0.0
-  #       - PORT=1337
-  #   container_name: gitfoss_web
-  #   depends_on:
-  #     - db
-  #   environment:
-  #     - COOKIE_NAME=gitfoss_ssid
-  #     - COOKIE_SECRET=gitfoss-cookie-secret
-  #     - DATABASE_URL=postgresql://postgres:change_me_password@gitfoss_db:5432/gitfoss?sslmode=disable&connection_limit=3
-  #     - DEPLOYMENT_DOMAIN=local-app.localhost
-  #     - DEPLOYMENT_SCHEME=http
-  #     - GIT_REPOSITORIES_ROOT=/var/lib/gitfoss/repos
-  #   ports:
-  #     - 1337:1337
-  #   volumes:
-  #     - ./data/gitfoss_repos:/var/lib/gitfoss/repos
+  web:
+    build:
+      context: .
+      dockerfile: Dockerfile
+      args:
+        - HOST=0.0.0.0
+        - PORT=1337
+    container_name: gitfoss_web
+    depends_on:
+      - gitfoss_db
+    environment:
+      - COOKIE_NAME=gitfoss_ssid
+      - COOKIE_SECRET=gitfoss-cookie-secret
+      - DATABASE_URL=postgresql://postgres:postgres@gitfoss_db:5432/gitfoss_local?sslmode=disable&connection_limit=3
+      - DEPLOYMENT_DOMAIN=local-app.localhost
+      - DEPLOYMENT_SCHEME=http
+      - GIT_REPOSITORIES_ROOT=/var/lib/gitfoss/repos
+    ports:
+      - 1337:1337
+    volumes:
+      - ./data/gitfoss_repos:/var/lib/gitfoss/repos

@@ -34,7 +34,7 @@
     "@ethicdevs/react-monolith": "^1.7.4",
     "@fastify/cookie": "6.0.0",
     "@fastify/formbody": "6.0.0",
-    "@prisma/client": "^4.4.0",
+    "@prisma/client": "^4.9.0",
     "cross-fetch": "^3.1.5",
     "cuid": "^2.1.8",
     "diffparser": "^2.0.1",

...
@@ -76,7 +76,7 @@
     "exoframe": "^6.2.0",
     "jest": "^27.5.1",
     "npm-run-all": "^4.1.5",
-    "prisma": "^4.4.0",
+    "prisma": "^4.9.0",
     "ts-jest": "^27.1.5",
     "ts-node-dev": "^2.0.0",
     "tslib": "^2.4.0",