npm install
npm run serve
npm run build
npm run lint
To deploy a trenz-docs wiki, follow these steps:
-
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:
-
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" } ] }
-
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 }
-
run:
docker-compose up -d
-
access your new wiki hosted at:
http://localhost:<FRONTEND PORT>