-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f149be5
Showing
10 changed files
with
594 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
config/config.yml | ||
*.iml | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM requarks/wiki:latest | ||
|
||
RUN chgrp -R 0 /var/wiki && chmod -R g=u /var/wiki | ||
|
||
WORKDIR /var/wiki | ||
|
||
RUN ln -s /var/wiki/config/config.yml config.yml | ||
|
||
ENTRYPOINT [ "node", "server" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
####################################################################### | ||
# Wiki.js - CONFIGURATION # | ||
####################################################################### | ||
# Full explanation + examples in the documentation: | ||
# https://docs.requarks.io/wiki/install | ||
# You can use an ENV variable by using $(ENV_VAR_NAME) as the value | ||
|
||
# --------------------------------------------------------------------- | ||
# Title of this site | ||
# --------------------------------------------------------------------- | ||
|
||
title: YOUR TITLE | ||
|
||
# --------------------------------------------------------------------- | ||
# Full public path to the site, without the trailing slash | ||
# --------------------------------------------------------------------- | ||
# INCLUDE CLIENT PORT IF NOT 80/443! | ||
|
||
host: $(WIKIJS_HOST) | ||
|
||
# --------------------------------------------------------------------- | ||
# Port the main server should listen to (80 by default) | ||
# --------------------------------------------------------------------- | ||
# To use process.env.PORT, comment the line below: | ||
|
||
port: $(WIKIJS_PORT) | ||
|
||
# --------------------------------------------------------------------- | ||
# Data Directories | ||
# --------------------------------------------------------------------- | ||
|
||
paths: | ||
repo: $(WIKIJS_PATHS_REPO) | ||
data: $(WIKIJS_PATHS_DATA) | ||
|
||
# --------------------------------------------------------------------- | ||
# Upload Limits | ||
# --------------------------------------------------------------------- | ||
# In megabytes (MB) | ||
|
||
uploads: | ||
maxImageFileSize: 3 | ||
maxOtherFileSize: 100 | ||
|
||
# --------------------------------------------------------------------- | ||
# Site Language | ||
# --------------------------------------------------------------------- | ||
# Possible values: en, de, es, fa, fr, ja, ko, nl, pt, ru, sr, sv, tr or zh | ||
|
||
lang: en | ||
|
||
# Enable for right to left languages (e.g. arabic): | ||
langRtl: false | ||
|
||
# --------------------------------------------------------------------- | ||
# Site Authentication | ||
# --------------------------------------------------------------------- | ||
|
||
public: false | ||
|
||
auth: | ||
defaultReadAccess: false | ||
local: | ||
enabled: true | ||
google: | ||
enabled: false | ||
clientId: GOOGLE_CLIENT_ID | ||
clientSecret: GOOGLE_CLIENT_SECRET | ||
microsoft: | ||
enabled: false | ||
clientId: MS_APP_ID | ||
clientSecret: MS_APP_SECRET | ||
facebook: | ||
enabled: false | ||
clientId: FACEBOOK_APP_ID | ||
clientSecret: FACEBOOK_APP_SECRET | ||
github: | ||
enabled: false | ||
clientId: GITHUB_CLIENT_ID | ||
clientSecret: GITHUB_CLIENT_SECRET | ||
slack: | ||
enabled: false | ||
clientId: 'SLACK_CLIENT_ID' | ||
clientSecret: 'SLACK_CLIENT_SECRET' | ||
ldap: | ||
enabled: false | ||
url: ldap://serverhost:389 | ||
bindDn: cn='root' | ||
bindCredentials: BIND_PASSWORD | ||
searchBase: o=users,o=example.com | ||
searchFilter: (uid={{username}}) | ||
tlsEnabled: false | ||
tlsCertPath: C:\example\root_ca_cert.crt | ||
azure: | ||
enabled: false | ||
clientId: APP_ID | ||
clientSecret: APP_SECRET_KEY | ||
resource: '00000002-0000-0000-c000-000000000000' | ||
tenant: 'YOUR_TENANT.onmicrosoft.com' | ||
oauth2: | ||
enabled: false | ||
clientId: OAUTH2_CLIENT_ID | ||
clientSecret: OAUTH2_CLIENT_SECRET | ||
authorizationURL: OAUTH2_AUTH_URL | ||
tokenURL: OAUTH2_TOKEN_URL | ||
oidc: | ||
enabled: false | ||
clientId: OPENID_CONNECT_CLIENT_ID | ||
clientSecret: OPENID_CONNECT_CLIENT_SECRET | ||
issuer: OPENID_CONNECT_ISSUER | ||
userInfoUrl: OPENID_CONNECT_USER_INFO_URL | ||
authorizationURL: OPENID_CONNECT_AUTHORIZATION_URL | ||
tokenURL: OPENID_CONNECT_TOKEN_URL | ||
emailClaim: OPENID_CONNECT_EMAIL_CLAIM_PATH | ||
usernameClaim: OPENID_CONNECT_USERNAME_CLAIM_PATH | ||
# --------------------------------------------------------------------- | ||
# Secret key to use when encrypting sessions | ||
# --------------------------------------------------------------------- | ||
# Use a long and unique random string (256-bit keys are perfect!) | ||
|
||
sessionSecret: $(WIKIJS_SESSION_SECRET) | ||
|
||
# --------------------------------------------------------------------- | ||
# Database Connection String | ||
# --------------------------------------------------------------------- | ||
|
||
db: mongodb://$(MONGODB_USER):$(MONGODB_PASSWORD)@wikijs-db:27017/$(MONGODB_DATABASE) | ||
|
||
# --------------------------------------------------------------------- | ||
# Git Connection Info | ||
# --------------------------------------------------------------------- | ||
|
||
git: | ||
url: https://github.com/youruser/yourrepo | ||
branch: master | ||
auth: | ||
|
||
# Type: basic or ssh | ||
type: basic | ||
|
||
# Only for Basic authentication: | ||
username: username | ||
password: password | ||
|
||
sslVerify: true | ||
|
||
# Default email to use as commit author | ||
serverEmail: your@email.address | ||
|
||
# Whether to use user email as author in commits | ||
showUserEmail: true | ||
|
||
# --------------------------------------------------------------------- | ||
# Features | ||
# --------------------------------------------------------------------- | ||
# You can enable / disable specific features below | ||
|
||
features: | ||
linebreaks: true | ||
mathjax: true | ||
|
||
# --------------------------------------------------------------------- | ||
# External Logging | ||
# --------------------------------------------------------------------- | ||
|
||
externalLogging: | ||
bugsnag: false | ||
loggly: false | ||
papertrail: false | ||
rollbar: false | ||
sentry: false | ||
|
||
# --------------------------------------------------------------------- | ||
# Color Theme | ||
# --------------------------------------------------------------------- | ||
|
||
theme: | ||
primary: indigo | ||
alt: blue-grey | ||
viewSource: all # all | write | false | ||
footer: blue-grey | ||
code: | ||
dark: true | ||
colorize: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Template | ||
labels: | ||
app: wikijs | ||
template: wikijs | ||
metadata: | ||
name: wikijs | ||
template.openshift.io/bindable: "false" | ||
parameters: | ||
- displaName: Name | ||
name: NAME | ||
required: true | ||
value: wikijs | ||
- description: Database volume capacity | ||
displayName: Volume Capacity | ||
name: VOLUME_CAPACITY | ||
required: true | ||
value: 5Gi | ||
|
||
objects: | ||
|
||
- apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: ${NAME}-db | ||
spec: | ||
ports: | ||
- name: mongodb | ||
port: 27017 | ||
selector: | ||
name: ${NAME}-db | ||
|
||
- apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: ${NAME}-db-data | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: ${VOLUME_CAPACITY} | ||
|
||
- apiVersion: v1 | ||
kind: ImageStream | ||
metadata: | ||
name: mongodb | ||
spec: | ||
lookupPolicy: | ||
local: false | ||
tags: | ||
- from: | ||
kind: DockerImage | ||
name: centos/mongodb-34-centos7 | ||
name: "2" | ||
referencePolicy: | ||
type: Source | ||
|
||
- apiVersion: v1 | ||
kind: DeploymentConfig | ||
metadata: | ||
annotations: | ||
template.alpha.openshift.io/wait-for-ready: "true" | ||
name: ${NAME}-db | ||
spec: | ||
replicas: 1 | ||
selector: | ||
name: ${NAME}-db | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
name: ${NAME}-db | ||
spec: | ||
containers: | ||
- env: | ||
- name: MONGODB_USER | ||
valueFrom: | ||
secretKeyRef: | ||
key: database-user | ||
name: ${NAME}-db | ||
- name: MONGODB_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
key: database-password | ||
name: ${NAME}-db | ||
- name: MONGODB_DATABASE | ||
valueFrom: | ||
secretKeyRef: | ||
key: database-name | ||
name: ${NAME}-db | ||
- name: MONGODB_ADMIN_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
key: database-admin-password | ||
name: ${NAME}-db | ||
image: ' ' | ||
imagePullPolicy: IfNotPresent | ||
livenessProbe: | ||
initialDelaySeconds: 30 | ||
tcpSocket: | ||
port: 27017 | ||
timeoutSeconds: 1 | ||
name: mongodb | ||
ports: | ||
- containerPort: 27017 | ||
volumeMounts: | ||
- mountPath: /var/lib/mongodb/data | ||
name: ${NAME}-db-data | ||
volumes: | ||
- name: ${NAME}-db-data | ||
persistentVolumeClaim: | ||
claimName: ${NAME}-db-data | ||
triggers: | ||
- imageChangeParams: | ||
automatic: true | ||
containerNames: | ||
- mongodb | ||
from: | ||
kind: ImageStreamTag | ||
name: mongodb:latest | ||
namespace: openshift | ||
type: ImageChange | ||
- type: ConfigChange |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Template | ||
labels: | ||
app: wikijs | ||
template: wikijs | ||
metadata: | ||
name: wikijs | ||
template.openshift.io/bindable: "false" | ||
parameters: | ||
- name: NAME | ||
value: wikijs | ||
- name: HOST | ||
required: false | ||
- name: LETSENCRYPT_ENABLED | ||
value: "false" | ||
objects: | ||
- apiVersion: v1 | ||
kind: Route | ||
metadata: | ||
annotations: | ||
kubernetes.io/tls-acme: '${LETSENCRYPT_ENABLED}' | ||
name: ${NAME} | ||
spec: | ||
host: ${HOST} | ||
port: | ||
targetPort: wikijs | ||
tls: | ||
termination: edge | ||
to: | ||
kind: Service | ||
name: ${NAME} | ||
weight: 100 | ||
wildcardPolicy: None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
oc start-build wikijs --from-dir="." --follow |
Oops, something went wrong.