Merged PR 8: merge
commit
4dbe90aa02
3
.env
3
.env
|
@ -1,3 +1,2 @@
|
||||||
PUBLIC_URL=http://*/play-nine
|
PUBLIC_URL=/play-nine/
|
||||||
PORT=3006
|
PORT=3006
|
||||||
REACT_APP_TEST_KEY = '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
# build environment
|
||||||
|
FROM node:12 as builder
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
COPY . ./
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# production environment
|
||||||
|
FROM node:12
|
||||||
|
|
||||||
|
RUN printf '\n\n- Copy application files\n'
|
||||||
|
|
||||||
|
ARG APP_SUBFOLDER=play-nine
|
||||||
|
|
||||||
|
COPY --from=builder /app/build ./application/${APP_SUBFOLDER}
|
||||||
|
COPY --from=builder /app/build/index.html ./application/
|
||||||
|
|
||||||
|
RUN npm install -g serve@11.3.0
|
||||||
|
EXPOSE 80
|
||||||
|
CMD ["sh","-c","serve -s application -p 80"]
|
File diff suppressed because it is too large
Load Diff
34
package.json
34
package.json
|
@ -3,17 +3,17 @@
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-svg-core": "^1.2.12",
|
"@testing-library/jest-dom": "^4.2.4",
|
||||||
"@fortawesome/free-solid-svg-icons": "^5.6.3",
|
"@testing-library/react": "^9.5.0",
|
||||||
"@fortawesome/react-fontawesome": "^0.1.4",
|
"@testing-library/user-event": "^7.2.1",
|
||||||
"bootstrap": "^4.2.1",
|
"bootstrap": "^4.3.1",
|
||||||
"font-awesome": "^4.7.0",
|
"font-awesome": "^4.7.0",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
"react": "^16.7.0",
|
"react": "^16.13.1",
|
||||||
"react-dom": "^16.7.0",
|
"react-dom": "^16.13.1",
|
||||||
"react-fontawesome": "^1.6.1",
|
"react-fontawesome": "^1.7.1",
|
||||||
"react-router-dom": "^5.0.1",
|
"react-router-dom": "^5.0.1",
|
||||||
"react-scripts": "^3.1.1"
|
"react-scripts": "3.4.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
|
@ -24,10 +24,16 @@
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": "react-app"
|
"extends": "react-app"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": {
|
||||||
">0.2%",
|
"production": [
|
||||||
"not dead",
|
">0.2%",
|
||||||
"not ie <= 11",
|
"not dead",
|
||||||
"not op_mini all"
|
"not op_mini all"
|
||||||
]
|
],
|
||||||
|
"development": [
|
||||||
|
"last 1 chrome version",
|
||||||
|
"last 1 firefox version",
|
||||||
|
"last 1 safari version"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import Game from "./game";
|
import Game from "./game";
|
||||||
|
import PageNotFound from "./PageNotFound";
|
||||||
|
import { Route, Switch } from "react-router-dom";
|
||||||
|
|
||||||
class App extends React.Component {
|
class App extends React.Component {
|
||||||
state = {};
|
state = {};
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Game />
|
<Switch>
|
||||||
|
<Route exact path="/" component={Game} />
|
||||||
|
<Route component={PageNotFound} />
|
||||||
|
</Switch>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const PageNotFound = () => <h1>Oops! Page not found</h1>;
|
||||||
|
|
||||||
|
export default PageNotFound;
|
Loading…
Reference in New Issue