Skip to content

Commit

Permalink
Added basic project files
Browse files Browse the repository at this point in the history
  • Loading branch information
samie committed Dec 1, 2021
1 parent 28e6e98 commit 4b3c668
Show file tree
Hide file tree
Showing 7 changed files with 471 additions and 20 deletions.
39 changes: 19 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# Compiled class file
*.class
/target/
.idea/
.settings
.project
.classpath

# Log file
*.log
*.iml
.DS_Store

# BlueJ files
*.ctxt
# The following files are generated/updated by vaadin-maven-plugin
node_modules/
frontend/generated/
pnpmfile.js

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
# Browser drivers for local integration tests
drivers/
# Error screenshots generated by TestBench for failed integration tests
error-screenshots/
webpack.generated.js
parseClientRoutes.js
src/main/resources/ts-recipe-info.json
frontend/ts-routes.ts
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
language: java
jdk: openjdk11

env:
- NODE_VERSION="12.18"

before_install:
# Disable all Travis default repositories
- sed -i "s/activeByDefault>true</activeByDefault>false</g" ~/.m2/settings.xml
- nvm install $NODE_VERSION

script:
- mvn -B -e -V clean install -Pproduction

# Cache requires a master build
branches:
only:
- master
cache:
directories:
- $HOME/.m2
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Build stage
FROM maven:3-jdk-11 as build
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get update -qq && apt-get install -qq --no-install-recommends nodejs
RUN useradd -m myuser
WORKDIR /usr/src/app/
RUN chown myuser:myuser /usr/src/app/
USER myuser
COPY --chown=myuser pom.xml ./

# This allows repeated builds to start from the next step, with all Maven dependencies cached
RUN mvn dependency:go-offline -Pproduction

COPY --chown=myuser:myuser src src
COPY --chown=myuser:myuser frontend frontend
COPY --chown=myuser package.json pnpm-lock.yaml parseClientRoutes.ts webpack.config.js ts-routes.ts.template ./
RUN mvn clean package -DskipTests -Pproduction

# Run stage
FROM openjdk:11
COPY --from=build /usr/src/app/target/*.jar /usr/app/app.jar
RUN useradd -m myuser
USER myuser
EXPOSE 8080
CMD java -jar /usr/app/app.jar
23 changes: 23 additions & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<!--
This file is auto-generated by Vaadin.
-->

<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
body, #outlet {
height: 100vh;
width: 100%;
margin: 0;
}
</style>
<!-- index.ts is included here automatically (either by the dev server or during the build) -->
</head>
<body>
<!-- This outlet div is where the views are rendered -->
<div id="outlet"></div>
</body>
</html>
65 changes: 65 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"name": "no-name",
"license": "UNLICENSED",
"dependencies": {
"@vaadin/common-frontend": "0.0.17",
"construct-style-sheets-polyfill": "3.0.4",
"lit": "2.0.0",
"@vaadin/router": "1.7.4",
"@polymer/polymer": "3.2.0"
},
"devDependencies": {
"compression-webpack-plugin": "4.0.1",
"esbuild-loader": "2.15.1",
"webpack-cli": "4.9.0",
"css-loader": "4.2.1",
"file-loader": "6.2.0",
"fork-ts-checker-webpack-plugin": "6.2.1",
"extra-watch-webpack-plugin": "1.0.3",
"glob": "7.1.6",
"lit-css-loader": "0.1.0",
"loader-utils": "2.0.0",
"workbox-core": "6.2.0",
"webpack": "4.46.0",
"html-webpack-plugin": "4.5.1",
"chokidar": "^3.5.0",
"workbox-precaching": "6.2.0",
"typescript": "4.4.3",
"webpack-merge": "4.2.2",
"webpack-dev-server": "4.1.1",
"extract-loader": "5.1.0",
"workbox-webpack-plugin": "6.2.0"
},
"vaadin": {
"dependencies": {
"@vaadin/common-frontend": "0.0.17",
"construct-style-sheets-polyfill": "3.0.4",
"lit": "2.0.0",
"@vaadin/router": "1.7.4",
"@polymer/polymer": "3.2.0"
},
"devDependencies": {
"compression-webpack-plugin": "4.0.1",
"esbuild-loader": "2.15.1",
"webpack-cli": "4.9.0",
"css-loader": "4.2.1",
"file-loader": "6.2.0",
"fork-ts-checker-webpack-plugin": "6.2.1",
"extra-watch-webpack-plugin": "1.0.3",
"glob": "7.1.6",
"lit-css-loader": "0.1.0",
"loader-utils": "2.0.0",
"workbox-core": "6.2.0",
"webpack": "4.46.0",
"html-webpack-plugin": "4.5.1",
"chokidar": "^3.5.0",
"workbox-precaching": "6.2.0",
"typescript": "4.4.3",
"webpack-merge": "4.2.2",
"webpack-dev-server": "4.1.1",
"extract-loader": "5.1.0",
"workbox-webpack-plugin": "6.2.0"
},
"hash": ""
}
}
Loading

0 comments on commit 4b3c668

Please sign in to comment.