Skip to content

Commit 9c2346b

Browse files
Added skeleton docker build
1 parent 39b9fd4 commit 9c2346b

File tree

19 files changed

+502
-1240
lines changed

19 files changed

+502
-1240
lines changed

.dockerignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.dockerignore
2-
.git*
2+
Dockerfile
3+
*git*
34
build
45
.idea
56
node_modules
6-
docker-entrypoint.d
77
.editorconfig

.run/Dockerfile.run.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="Dockerfile" type="docker-deploy" factoryName="dockerfile" server-name="Docker for Mac">
3+
<deployment type="dockerfile">
4+
<settings>
5+
<option name="imageTag" value="hiberbee/skeleton:latest" />
6+
<option name="buildCliOptions" value="" />
7+
<option name="buildOnly" value="true" />
8+
<option name="command" value="" />
9+
<option name="containerName" value="" />
10+
<option name="entrypoint" value="" />
11+
<option name="commandLineOptions" value="" />
12+
<option name="sourceFilePath" value="Dockerfile" />
13+
</settings>
14+
</deployment>
15+
<method v="2" />
16+
</configuration>
17+
</component>

.stylelintrc

Lines changed: 0 additions & 5 deletions
This file was deleted.

Caddyfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
experimental_http3
33
email vlad@hiberbee.com
44
}
5-
:80 {
5+
:8080 {
66
root * /var/www/html
77
encode zstd gzip
8-
templates
98
file_server browse
109
}

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
ARG nodeVersion=13
22
FROM node:${nodeVersion}-alpine AS base
33
WORKDIR /usr/local/src
4+
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=false
45
ONBUILD COPY package.json *lock /tmp/
56
ONBUILD RUN cd /tmp \
6-
&& yarn --ignore-scripts --prefer-offline \
7+
&& yarn --production --ignore-scripts --prefer-offline \
78
&& cd /usr/local/src \
89
&& ln -s /tmp/node_modules
910
ONBUILD COPY . .
@@ -13,5 +14,7 @@ FROM base AS build
1314

1415
FROM caddy:alpine
1516
WORKDIR /var/www/html
16-
COPY --from=build /usr/local/src/build/ ./
17-
COPY Caddyfile /etc/caddy/
17+
RUN addgroup -S hiberbee -g 1000 && adduser -S -G hiberbee -u 1000 hiberbee
18+
COPY --chown=hiberbee --from=build /usr/local/src/build/ ./
19+
COPY --chown=hiberbee Caddyfile /etc/caddy/
20+
EXPOSE 8080

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ wrapper {
3838
distributionType(Wrapper.DistributionType.ALL)
3939
gradleVersion("6.4-rc-1")
4040
}
41+
4142
java {
4243
sourceCompatibility = JavaVersion.VERSION_11
4344
targetCompatibility = JavaVersion.VERSION_14
4445
}
46+
4547
def projectGroup = "dev.hiberbee"
4648
def projectVersion = (Instant.now().toEpochMilli() / 1000) as String
4749

docker-entrypoint.d/nginx.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

package.json

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@template/typescript-react-antd",
2+
"name": "@skeleton/typescript-react-antd",
33
"private": true,
44
"description": "Antd React Typescript boilerplate",
55
"repository": {
@@ -16,62 +16,54 @@
1616
"email": "vlad@hiberbee.com",
1717
"url": "https://github.com/vladyslavvolkov"
1818
},
19+
"homepage": "https://hiberbee.github.io",
1920
"main": "src/index.tsx",
2021
"dependencies": {
22+
"@types/node": "^13.13.0",
23+
"@types/react": "^16.9.34",
24+
"@types/react-dom": "^16.9.6",
25+
"@types/react-router-dom": "^5.1.4",
2126
"antd": "^4.1.4",
2227
"react": "^16.13.1",
2328
"react-dom": "^16.13.1",
24-
"react-icons": "^3.9.0",
2529
"react-router-dom": "^5.1.2",
26-
"react-scripts": "^3.4.1"
30+
"react-scripts": "^3.4.1",
31+
"rimraf": "^3.0.2",
32+
"typescript": "^3.8.3"
2733
},
2834
"devDependencies": {
29-
"typescript": "^3.8.3",
30-
"@types/node": "^13.13.0",
31-
"@types/react": "^16.9.34",
32-
"@types/react-dom": "^16.9.6",
33-
"@types/react-router-dom": "^5.1.4",
34-
"@types/react-syntax-highlighter": "^11.0.4",
3535
"@typescript-eslint/eslint-plugin": "^2.28.0",
3636
"@typescript-eslint/parser": "^2.28.0",
37-
"dotenv": "^8.2.0",
3837
"eslint": "^6.8.0",
3938
"eslint-config-prettier": "^6.10.1",
4039
"eslint-plugin-import": "^2.20.2",
4140
"eslint-plugin-prettier": "^3.1.3",
4241
"eslint-plugin-react": "^7.19.0",
4342
"eslint-plugin-react-hooks": "^3.0.0",
44-
"husky": "^4.2.5",
45-
"lint-staged": "^10.1.5",
4643
"prettier": "^2.0.4",
47-
"rimraf": "^3.0.2",
48-
"stylelint": "^13.3.2"
44+
"serve": "^11.3.0"
4945
},
5046
"scripts": {
51-
"build": "NODE_ENV=production react-scripts build",
52-
"clean": "rimraf build",
53-
"eject": "react-scripts eject",
54-
"lint": "tsc && prettier --write src && eslint 'src/**/*.{js,ts,tsx}' --quiet --fix",
55-
"start": "HTTPS=true SSL_CRT_FILE=certs/tls.crt SSL_KEY_FILE=certs/tls.key NODE_ENV=production react-scripts start",
56-
"test": "react-scripts test --env=jsdom"
57-
},
58-
"lint-staged": {
59-
"*.{js,jsx,ts,tsx}": [
60-
]
61-
},
62-
"husky": {
63-
"hooks": {
64-
"pre-commit": "lint-staged"
65-
}
47+
"build": "NODE_ENV=production yarn clean && yarn react-scripts build",
48+
"clean": "yarn rimraf build",
49+
"lint": "yarn tsc && yarn prettier --write src && yarn eslint 'src/**/*.{js,ts,tsx}' --quiet --fix",
50+
"start": "yarn serve -s build",
51+
"watch": "HTTPS=true SSL_CRT_FILE=certs/tls.crt SSL_KEY_FILE=certs/tls.key NODE_ENV=production yarn react-scripts start"
6652
},
6753
"engines": {
6854
"npm": "^6.0",
6955
"yarn": "^1.20"
7056
},
71-
"browserslist": [
72-
">0.2%",
73-
"not dead",
74-
"not ie <= 11",
75-
"not op_mini all"
76-
]
57+
"browserslist": {
58+
"production": [
59+
">0.2%",
60+
"not dead",
61+
"not op_mini all"
62+
],
63+
"development": [
64+
"last 1 chrome version",
65+
"last 1 firefox version",
66+
"last 1 safari version"
67+
]
68+
}
7769
}

public/img/background.webp

-626 KB
Binary file not shown.

public/index.html

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,71 @@
33
<html lang="en">
44
<head>
55
<title>Hiberbee</title>
6-
<meta name="description" content="Development resources & tooling">
6+
<meta content="Development resources & tooling" name="description">
77
<meta charset="utf-8"/>
88
<meta content="IE=edge" http-equiv="X-UA-Compatible">
9-
<meta content="#FFBD42" name="theme-color">
9+
<meta content="#FFC83C" name="theme-color">
1010
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"/>
11-
<link rel="alternate" href=" /" hreflang="en"/>
12-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json"/>
13-
<link rel="stylesheet" crossorigin="anonymous" disabled href="https://use.typekit.net/ckf8ybo.css">
14-
<link rel="icon" href="%PUBLIC_URL%/img/favicon-32x32.png" sizes="32x32" type="image/png">
15-
<link rel="icon" href="%PUBLIC_URL%/img/favicon-16x16.png" sizes="16x16" type="image/png">
16-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/img/apple-touch-icon.png" sizes="180x180"/>
11+
<link href=" /" hreflang="en" rel="alternate"/>
12+
<link href="%PUBLIC_URL%/manifest.json" rel="manifest"/>
13+
<link href="%PUBLIC_URL%/img/favicon-32x32.png" rel="icon" sizes="32x32" type="image/png">
14+
<link href="%PUBLIC_URL%/img/favicon-16x16.png" rel="icon" sizes="16x16" type="image/png">
15+
<link href="%PUBLIC_URL%/img/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180"/>
16+
<link href="https://fonts.googleapis.com/css2?family=Redressed&display=swap" disabled rel="stylesheet">
17+
<style>
18+
html, body {
19+
font-family: 'Redressed', sans-serif !important;
20+
}
21+
22+
.ant-result-title {
23+
font-size: 40px !important;
24+
}
25+
26+
.ant-result-subtitle {
27+
font-size: 25px !important;
28+
}
29+
30+
.github-corner:hover .octo-arm {
31+
animation: octocat-wave 560ms ease-in-out
32+
}
33+
34+
@keyframes octocat-wave {
35+
0%, 100% {
36+
transform: rotate(0)
37+
}
38+
20%, 60% {
39+
transform: rotate(-25deg)
40+
}
41+
40%, 80% {
42+
transform: rotate(10deg)
43+
}
44+
}
45+
46+
@media (max-width: 500px) {
47+
.github-corner:hover .octo-arm {
48+
animation: none
49+
}
50+
51+
.github-corner .octo-arm {
52+
animation: octocat-wave 560ms ease-in-out
53+
}
54+
}
55+
</style>
1756
</head>
1857
<body>
58+
<a href="https://github.com/Hiberbee" target="_blank" rel="nofollow noreferrer" class="github-corner" aria-label="View source on GitHub">
59+
<svg width="100" height="100" viewBox="0 0 250 250" fill="#242424" color="#f0f2f5"
60+
style="position: absolute; top: 0; border: 0; right: 0;"
61+
aria-hidden="true">
62+
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"/>
63+
<path
64+
d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
65+
fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"/>
66+
<path
67+
d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
68+
fill="currentColor" class="octo-body"/>
69+
</svg>
70+
</a>
1971
<noscript>
2072
You need to enable JavaScript to run this app.
2173
</noscript>

0 commit comments

Comments
 (0)