Initial commit

This commit is contained in:
Robin Grenzdörfer 2023-12-26 20:24:42 +01:00
commit 66d0377a00
657 changed files with 21841 additions and 0 deletions

1
.basic-auth-code Normal file
View File

@ -0,0 +1 @@
code:$apr1$AeePIAei$E9E6E6jtFFtwmtGhIEG.Y/

2
.basic-auth-web Normal file
View File

@ -0,0 +1,2 @@
code:$apr1$AeePIAei$E9E6E6jtFFtwmtGhIEG.Y/
web:$apr1$/zc/TBtD$ZGr3RqPiULYMD0kJUup5E0

151
.drone.yml.bak Normal file
View File

@ -0,0 +1,151 @@
kind: pipeline
type: docker
name: default
steps:
##############################
# Build and deploy docs
##############################
- name: build docs
image: node:18
pull: if-not-exists
environment:
FORCE_COLOR: "true"
commands:
- cd docs
- yarn install
- yarn docpress:build
when:
branch: [master]
event: [push]
- name: deploy docs
image: instrumentisto/rsync-ssh
pull: if-not-exists
environment:
RSYNC_HOST: ftp1.webmakers.de
RSYNC_PORT: 22222
RSYNC_USER: webmakers_tibi_docs_rsync_master
RSYNC_PASS:
from_secret: rsync_master
commands:
- cd docs
- >
rsync -rlcgD --perms -i -u -v --stats --progress
--delete
-e "sshpass -p $${RSYNC_PASS} ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p $${RSYNC_PORT}"
_docpress/
$${RSYNC_USER}@$${RSYNC_HOST}:./
when:
branch: [master]
event: [push]
##############################
# Demo project
##############################
- name: yarn install
image: node:18
pull: if-not-exists
environment:
FORCE_COLOR: "true"
commands:
- yarn install
- name: modify config
image: alpine/git
commands:
- sed -i 's#\(sentryEnvironment.*\)".*"#\1"${DRONE_BRANCH}"#g' frontend/src/config.ts
- sed -i 's#//\( sentry\\.init.*\)#\1#g' frontend/src/config.ts
- export $(cat .env | xargs)
- echo "PROJECT_RELEASE=$${RELEASE_PROJECT_SLUG}.r`git rev-list HEAD --count`-`git describe --all --long | sed 's+/+-+'`" >> .env
- export $(cat .env | xargs)
- cat .env
- sed -i 's#\(const release = \).*#\1"'$${PROJECT_RELEASE}'"#g' api/hooks/config-client.js
- name: build
image: node:18
commands:
- yarn build
- name: build ssr
image: node:18
commands:
- yarn build:server
- name: build legacy
image: node:18
commands:
- yarn build:legacy
- name: modify html
image: bash
commands:
- bash scripts/preload-meta.sh frontend/spa.html
- bash scripts/preload-meta.sh frontend/spa.html > frontend/_spa.html
- cp frontend/_spa.html frontend/spa.html
- export stamp=`date +%s`
- echo $$stamp
- sed -i s/__TIMESTAMP__/$$stamp/g frontend/spa.html
#- sed -i s/__TIMESTAMP__/$$stamp/g frontend/serviceworker.js
#- cat frontend/serviceworker.js
- cp frontend/spa.html api/templates/spa.html
- cat frontend/spa.html
# staging
- name: copy api config to staging
image: instrumentisto/rsync-ssh
volumes:
- name: data
path: /data
commands:
- rsync -av api /data/
- mkdir -p /data/frontend/dist
- rsync -av frontend/dist/ /data/frontend/dist/
when:
branch: [dev]
event: [push]
- name: review in staging
image: docker/compose:1.22.0
commands:
- docker-compose -p ${DRONE_BRANCH}-${DRONE_REPO_NAME}-${DRONE_REPO_OWNER} up -d --build --remove-orphans
volumes:
- name: docker
path: /var/run/docker.sock
when:
branch: [dev]
event: [push]
# live
- name: deploy master
image: instrumentisto/rsync-ssh
environment:
RSYNC_USER: ""
RSYNC_PASS:
from_secret: rsync_master
# remove if user and pass is set
failure: ignore
commands:
- apk add --no-cache sshpass curl
- scripts/deploy.sh ftp1.webmakers.de $${RSYNC_USER} $${RSYNC_PASS}
# - curl -X POST "https://www....de/api/ssr?token=TowendQhi&clear=1"
when:
branch: [master]
event: [push]
# - name: upload sourcemaps for glitchtip
# image: node
# environment:
# GLITCHTIP_TOKEN:
# from_secret: glitchtip_token
# commands:
# - yarn upload:sourcemaps
########
volumes:
- name: data
host:
path: /data/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}/${DRONE_BRANCH}
- name: docker
host:
path: /var/run/docker.sock

7
.env Normal file
View File

@ -0,0 +1,7 @@
PROJECT_NAME=tibi-docs
TIBI_PREFIX=tibi
TIBI_NAMESPACE=tibi-docs
UID=100
GID=101
RELEASE_ORG_SLUG=webmakers-gmbh
RELEASE_PROJECT_SLUG=tibi-docs

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
.yarn/cache/* filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,58 @@
name: deploy to production
on: "push"
# push:
# branches:
# - master
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
container:
image: gitbase.de/actions/ubuntu:latest
volumes:
- /data:/data
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
submodules: true
- run: |
git fetch --force --tags
# setup node 18
- name: setup node 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: build docs
env:
FORCE_COLOR: "true"
run: |
node --version
cd docs
npm install -g yarn
yarn install
yarn docpress:build
- name: deploy docs
# only if branch is master
if: github.ref == 'refs/heads/master'
env:
RSYNC_HOST: ftp1.webmakers.de
RSYNC_PORT: 22222
RSYNC_USER: webmakers_tibi_docs_rsync_master
RSYNC_PASS: ${{ secrets.rsync_master }}
run: |
cd docs
ls -la
rsync -rlcgD --perms -i -u -v --stats --progress \
--delete \
-e "sshpass -p ${RSYNC_PASS} ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p ${RSYNC_PORT}" \
_docpress/ \
${RSYNC_USER}@${RSYNC_HOST}:./ \

22
.gitignore vendored Normal file
View File

@ -0,0 +1,22 @@
docs/_docpress
docs/node_modules
docs/.yarn/*
!docs/.yarn/patches
!docs/.yarn/plugins
!docs/.yarn/releases
!docs/.yarn/sdks
!docs/.yarn/versions
api/hooks/lib/app.server*
node_modules
media
tmp
_temp
frontend/dist
yarn-error.log
.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

15
.prettierrc Normal file
View File

@ -0,0 +1,15 @@
{
"printWidth": 120,
"tabWidth": 4,
"singleQuote": false,
"trailingComma": "es5",
"semi": false,
"newline-before-return": true,
"no-duplicate-variable": [true, "check-parameters"],
"no-var-keyword": true,
"svelteSortOrder": "scripts-markup-styles",
"svelteStrictMode": true,
"svelteBracketNewLine": true,
"svelteAllowShorthand": true,
"svelteIndentScriptAndStyle": true
}

28
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,28 @@
{
"editor.tabCompletion": "on",
"diffEditor.codeLens": true,
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"yaml.schemas": {
"./../../cms/tibi-types/schemas/api-config/config.json": "api/config.y*ml",
"./../../cms/tibi-types/schemas/api-config/collection.json": "api/collections/*.y*ml",
"./../../cms/tibi-types/schemas/api-config/field.json": "api/collections/fields/*.y*ml",
"./../../cms/tibi-types/schemas/api-config/fieldArray.json": "api/collections/fieldLists/*.y*ml",
"./../../cms/tibi-types/schemas/api-config/job.json": "api/jobs/*.y*ml",
"./../../cms/tibi-types/schemas/api-config/assets.json": "api/assets/*.y*ml",
"https://json.schemastore.org/github-workflow.json": "file:///WM_Dev/src/gitbase.de/cms/tibi-docs/.gitea/workflows/deploy.yaml"
},
"yaml.customTags": ["!include scalar"],
"filewatcher.commands": [
{
"match": "/api/.*(\\.ya?ml|js|env)$",
"isAsync": false,
"cmd": "docker compose -p tibi-docs restart tibiserver",
"event": "onFileChange"
}
],
"i18n-ally.localesPaths": ["frontend/locales"],
"i18n-ally.sourceLanguage": "de",
"i18n-ally.keystyle": "nested"
}

BIN
.yarn/cache/@ampproject-remapping-npm-2.2.0-114878fa50-d74d170d06.zip (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
.yarn/cache/@ampproject-remapping-npm-2.2.1-3da3d624be-03c04fd526.zip (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
.yarn/cache/@babel-cli-npm-7.23.0-5f9206645f-beeb189560.zip (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
.yarn/cache/@babel-code-frame-npm-7.22.13-2782581d20-22e342c807.zip (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
.yarn/cache/@babel-compat-data-npm-7.23.3-3dfda6d38a-52fff649d4.zip (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
.yarn/cache/@babel-core-npm-7.23.3-9c9bbb2dbe-d306c1fa68.zip (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
.yarn/cache/@babel-generator-npm-7.23.3-a2ca9dda65-b6e71cca85.zip (Stored with Git LFS) vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
.yarn/cache/@babel-helpers-npm-7.23.2-aa45e8b40c-aaf4828df7.zip (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
.yarn/cache/@babel-highlight-npm-7.22.20-5de7aba88d-84bd034dca.zip (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
.yarn/cache/@babel-parser-npm-7.23.3-8d3a021e39-4aa7366e40.zip (Stored with Git LFS) vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More