Skip to content

trenz-gmbh/trenz-docs

Folders and files

NameName
Last commit message
Last commit date
Oct 19, 2022
Jul 11, 2022
Jul 11, 2023
Jul 11, 2023
Jul 6, 2022
Oct 19, 2022
Aug 10, 2022
Aug 30, 2022
Jul 6, 2022
Oct 18, 2022
Oct 19, 2022
Jul 28, 2022
Oct 19, 2022
Jul 6, 2022
Aug 30, 2022
Jul 6, 2022
Oct 19, 2022
Oct 19, 2022
Jul 6, 2022
Oct 19, 2022

Repository files navigation

trenz-docs

Node.js CI Docker Image CI

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

Deployment

To deploy a trenz-docs wiki, follow these steps:

  1. create a docker-compose.yml or copy the one from this repository and replace the ports:

    version: '3.4'
    
    services:
      frontend:
        image: ghcr.io/trenz-gmbh/trenz-docs:latest
        ports:
          - "<FRONTEND PORT>:80"
        restart: unless-stopped
        depends_on:
          - api
        volumes:
          - ./webapp-settings.local.json:/usr/share/nginx/html/webapp-settings.json
      api:
        image: ghcr.io/trenz-gmbh/trenz-docs-api:latest
        environment:
          - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Production}
          - Meilisearch__Url=http://meilisearch:7700
          - Meilisearch__ApiKey=${MEILISEARCH_API_KEY:-masterKey}
        ports:
          - "<API PORT>:80"
        restart: unless-stopped
        depends_on:
          - meilisearch
        volumes:
          - ./appsettings.local.json:/app/appsettings.local.json
      meilisearch:
        image: getmeili/meilisearch:latest
        ports:
          - "7700:7700"
        environment:
          - MEILI_MASTER_KEY=${MEILISEARCH_API_KEY:-masterKey}
          - MEILI_NO_ANALYTICS=true
        restart: unless-stopped
        volumes:
          - meili_data:/data
    
    volumes:
      meili_data:
  2. add a appsettings.local.json file to specify which repositories to use as sources:

    {
      "Sources": [
        {
          "Name": "My internal wiki",
          "Type": "git",
          "Url": "https://path/to/my/git/repo.git",
          "Username": "trenz-docs",
          "Password": "$3cr3t"
        }
      ]
    }
  3. add a webapp-settings.local.json and add your customer-facing api endpoint:

    {
      "name": "<YOUR DOCS NAME>",
      "theme": {
        "primary": "80,120,200",
        "primary-foreground": "255,255,255"
      },
      "api": {
        "baseUrl": "https://<YOUR API DOMAIN>/api/"
      },
      "useAuth": false
    }
  4. run:

    docker-compose up -d
  5. access your new wiki hosted at:

    http://localhost:<FRONTEND PORT>