Skip to content

Commit

Permalink
new version 2022
Browse files Browse the repository at this point in the history
  • Loading branch information
sheggi committed Jun 27, 2022
1 parent 9cf79b7 commit 4f778e1
Show file tree
Hide file tree
Showing 130 changed files with 43,677 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.nuxt
.vscode
dist
node_modules
schemas
testdata
.editorconfig
.env.example
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
NUXT_ENV_TITLE="ÖREB-Viewer | Visualiseur RDPPF"

# apply configurations from this directory in ./config
NUXT_ENV_CONFIG_CONTEXT=local

# credentials for esri token authentication
NUXT_ENV_TOKEN_USERNAME=user
NUXT_ENV_TOKEN_PASSWORD=password
75 changes: 75 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
parserOptions: {
parser: 'babel-eslint',
},
extends: [
'@nuxtjs',
'plugin:prettier/recommended',
'plugin:nuxt/recommended',
],
plugins: ['prettier'],

rules: {
'no-console': 'off',
'import/newline-after-import': ['error', { count: 1 }],
'vue/no-v-html': 'off',
'vue/component-name-in-template-casing': [
'error',
'PascalCase',
{
registeredComponentsOnly: false,
ignores: ['transition', 'client-only', 'i18n'],
},
],
'vue/custom-event-name-casing': ['error', 'kebab-case'],
'vue/v-on-event-hyphenation': [
'error',
'always',
{
autofix: false,
},
],
'vue/html-self-closing': [
'error',
{
html: {
void: 'any',
normal: 'always',
component: 'always',
},
svg: 'always',
math: 'always',
},
],
'vue/html-comment-content-spacing': ['error', 'always'],
'vue/padding-line-between-blocks': ['error', 'always'],
'vue/new-line-between-multi-line-property': [
'error',
{
minLineOfMultilineProperty: 2,
},
],
'vue/no-useless-v-bind': [
'error',
{
ignoreIncludesComment: true,
ignoreStringEscape: true,
},
],
'vue/v-for-delimiter-style': ['error', 'in'],
'vue/no-empty-component-block': ['error'],
'prettier/prettier': [
'error',
{
singleQuote: true,
trailingComma: 'es5',
semi: false,
},
],
},
}
100 changes: 100 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
/config/local
/config/*-local
/config/defaults/setup.scss
/testdata


# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
/logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# Nuxt generate
dist

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless

# IDE / Editor
.idea

# Service worker
sw.*

# macOS
.DS_Store

# Vim swap files
*.swp

# VSCode
.vscode

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14.17.0
41 changes: 41 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"eslint.packageManager": "yarn",
"npm.packageManager": "yarn",
"[javascript]": {
"editor.formatOnSave": false,
"editor.tabSize": 2
},
"[vue]": {
"editor.formatOnSave": false,
"editor.tabSize": 2
},
"eslint.validate": [
{
"language": "javascript",
"autoFix": true
},
{
"language": "javascriptreact",
"autoFix": true
},
{
"language": "html",
"autoFix": true
},
{
"language": "vue",
"autoFix": true
}
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"i18n-ally.localesPaths": [
"locales",
"config/bern/locales",
"config/defaults/locales"
],
"i18n-ally.keystyle": "flat",
"i18n-ally.displayLanguage": "DE",
"i18n-ally.sourceLanguage": "de"
}
54 changes: 54 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# build the nuxt app
FROM node:16-alpine as build-app

# create destination directory
RUN mkdir -p /app
WORKDIR /app

# copy the app, note .dockerignore
COPY . .
RUN npm install
RUN npm run generate

# build the server
# https://lipanski.com/posts/smallest-docker-image-static-website
FROM alpine:3.13.2 AS build-server

ARG THTTPD_VERSION=2.29

# Install all dependencies required for compiling thttpd
RUN apk add gcc musl-dev make

# Download thttpd sources
RUN wget http://www.acme.com/software/thttpd/thttpd-${THTTPD_VERSION}.tar.gz \
&& tar xzf thttpd-${THTTPD_VERSION}.tar.gz \
&& mv /thttpd-${THTTPD_VERSION} /thttpd

# Compile thttpd to a static binary which we can copy around
RUN cd /thttpd \
&& ./configure \
&& make CCOPT='-O2 -s -static' thttpd

# Create a non-root user to own the files and run our server
RUN adduser -D static

# Switch to the scratch image
FROM scratch

EXPOSE 3000

# Copy over the user
COPY --from=build-server /etc/passwd /etc/passwd

# Copy the thttpd static binary
COPY --from=build-server /thttpd/thttpd /

# Use our non-root user
USER static
WORKDIR /home/static

# Copy the static website
COPY --from=build-app /app/dist .

# Run thttpd
CMD ["/thttpd", "-D", "-h", "0.0.0.0", "-p", "3000", "-d", "/home/static", "-u", "static", "-l", "-", "-M", "60"]
Loading

0 comments on commit 4f778e1

Please sign in to comment.