Skip to content

Commit 6696383

Browse files
authored
Merge pull request #9 from samply/release-1.0.0
Release 1.0.0
2 parents f6cdc4d + 7a05572 commit 6696383

24 files changed

+22823
-2
lines changed

.dockerignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
dist
2+
.env
3+
### Example user template template
4+
### Example user template
5+
6+
# IntelliJ project files
7+
.idea
8+
*.iml
9+
out
10+
gen
11+
.github
12+
.husky

.env.template

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
TEILER_BACKEND_URL=
2+
TEILER_DASHBOARD_URL=
3+
DEFAULT_LANGUAGE=
4+
HTTP_RELATIVE_PATH=

.eslintrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": ["ts-important-stuff"],
3+
"parser": "@babel/eslint-parser",
4+
"rules": {
5+
"linebreak-style": 0
6+
}
7+
}

.github/workflows/ci.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Docker CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
# Build then a new version is tagged
9+
tags:
10+
- '*.*.*'
11+
pull_request:
12+
branches:
13+
- main
14+
- develop
15+
schedule:
16+
# Build every night at 1am
17+
- cron: '0 1 * * *'
18+
jobs:
19+
build:
20+
uses: samply/github-workflows/.github/workflows/docker-ci.yml@main
21+
with:
22+
# The Docker Hub Repository you want eventually push to, e.g samply/share-client
23+
image-name: "samply/teiler-orchestrator"
24+
secrets:
25+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
26+
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

.gitignore

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# TypeScript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
60+
# next.js build output
61+
.next
62+
dist
63+
64+
# Editor directories and files
65+
.idea
66+
.vscode
67+
*.suo
68+
*.ntvs*
69+
*.njsproj
70+
*.sln
71+
*.sw?
72+
.DS_Store

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm exec pretty-quick --staged && npm exec concurrently npm:test npm:lint

.prettierignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.gitignore
2+
.prettierignore
3+
yarn.lock
4+
yarn-error.log
5+
package-lock.json
6+
LICENSE
7+
*.ejs
8+
dist
9+
coverage
10+
pnpm-lock.yaml

CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
5+
and this project adheres to [Semantic Versioning](http://semver.org/).
6+
7+
## [1.0.0 - 2023-12-13]
8+
### Added
9+
- First version
10+
- Teiler core config
11+
- React support
12+
- Teiler UI title
13+
- Multi-language support for teiler-ui
14+
- Generate single-spa-router from teiler-core import-map
15+
- Docker ignore
16+
- Rename Teiler Orchestrator, Teiler Dashboard and Teiler Backend
17+
- Main in Docker CI
18+
19+
## Changed
20+
- Title
21+
- Rename developer to develop
22+
- Rename: Teiler Orchestrator
23+
24+
## Fixed
25+
- Show env.js of teiler-ui in html head
26+
- Add http relative path (compatibility with traefik)

Dockerfile

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# 1st Stage: Build project
2+
FROM node:alpine AS build
3+
WORKDIR /app
4+
COPY package.json package-lock.json ./
5+
RUN npm install
6+
COPY . .
7+
COPY docker/.env.template ./.env
8+
#RUN rm -f ./.env
9+
RUN npm run build
10+
11+
12+
# 2nd Stage: Create nginx image with built project
13+
FROM nginx:alpine
14+
15+
### Install bash
16+
RUN apk update
17+
RUN apk upgrade
18+
RUN apk add bash
19+
20+
### Configuration of NGINX
21+
COPY docker/nginx.conf /etc/nginx/nginx.conf
22+
23+
24+
EXPOSE 9000
25+
WORKDIR /usr/share/nginx/html
26+
COPY --from=build /app/dist .
27+
28+
29+
ADD docker/start.sh /samply/
30+
RUN chmod +x /samply/start.sh
31+
32+
CMD ["/samply/start.sh"]

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
# teiler-root-config
2-
Single SPA root config project for Teiler UI
1+
# teiler-orchestrator
2+
Single-SPA root-config project for Teiler UI
3+
4+
## Docker
5+
docker build -t teiler-orchestrator .
6+
docker run teiler-orchestrator

babel.config.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env",
4+
"@babel/preset-typescript"
5+
],
6+
"plugins": [
7+
[
8+
"@babel/plugin-transform-runtime",
9+
{
10+
"useESModules": true,
11+
"regenerator": false
12+
}
13+
]
14+
],
15+
"env": {
16+
"test": {
17+
"presets": [
18+
["@babel/preset-env", {
19+
"targets": "current node"
20+
}]
21+
]
22+
}
23+
}
24+
}

docker-compose.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: "3"
2+
3+
services:
4+
5+
test-orchestrator:
6+
# image: test-orchestrator
7+
build: .
8+
9+
# depends_on:
10+
# - teiler-backend
11+
ports:
12+
- 9000:9000
13+
environment:
14+
TEILER_BACKEND_URL: "http://localhost:8085"
15+
TEILER_DASHBOARD_URL: "http://localhost:4200"
16+
DEFAULT_LANGUAGE: "de"
17+
18+
# teiler-backend :
19+
# image: teiler-backend

docker/.env.template

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# import map json url
2+
TEILER_BACKEND_URL=${TEILER_BACKEND_URL}
3+
TEILER_DASHBOARD_URL=${TEILER_DASHBOARD_URL}
4+
DEFAULT_LANGUAGE=${DEFAULT_LANGUAGE}
5+
HTTP_RELATIVE_PATH=${HTTP_RELATIVE_PATH}

docker/nginx.conf

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
worker_processes 1;
2+
3+
events {
4+
worker_connections 1024;
5+
}
6+
7+
http {
8+
server {
9+
listen 9000;
10+
root /usr/share/nginx/html;
11+
index index.html index.htm;
12+
include /etc/nginx/mime.types;
13+
14+
gzip on;
15+
gzip_min_length 1000;
16+
gzip_proxied expired no-cache no-store private auth;
17+
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
18+
19+
location / {
20+
try_files $uri $uri/ /index.html;
21+
add_header Cache-Control "no-cache";
22+
}
23+
24+
location ^~ /config/ {
25+
add_header Cache-Control "no-cache";
26+
add_header X-Content-Type-Options nosniff;
27+
}
28+
29+
location ~ \.(css|js)$ {
30+
expires max;
31+
add_header Cache-Control "public";
32+
add_header X-Content-Type-Options nosniff;
33+
}
34+
}
35+
}

docker/start.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
envsubst < index.html > temp.html
4+
mv temp.html index.html
5+
envsubst < samply-root-config.js > temp-samply-root-config.js
6+
mv temp-samply-root-config.js samply-root-config.js
7+
8+
echo 'Start Root Config in NGINX in foreground (non-daemon-mode)'
9+
exec nginx -g 'daemon off;'

0 commit comments

Comments
 (0)