preparation for publication
parent
55d3fc3f97
commit
b70435cbfa
15
Dockerfile
15
Dockerfile
|
@ -10,7 +10,16 @@ RUN npm run build
|
|||
|
||||
# production environment
|
||||
FROM node:12
|
||||
COPY --from=builder /app/build ./build
|
||||
RUN npm install
|
||||
ARG APP_SUBFOLDER=reverse-proxy
|
||||
|
||||
COPY --from=builder /app/build ./application/${APP_SUBFOLDER}
|
||||
COPY --from=builder /app/build/index.html ./application/
|
||||
|
||||
#install static server
|
||||
RUN npm install -g serve
|
||||
|
||||
#set workdir to root
|
||||
WORKDIR /
|
||||
EXPOSE 80
|
||||
CMD ["sh","-c","node serve -s build -p 80"]
|
||||
|
||||
CMD ["sh", "-c", "node serve -s application -p 80"]
|
||||
|
|
|
@ -72,7 +72,7 @@ const AboutComponent = () => {
|
|||
<Typography paragraph>Method:</Typography>
|
||||
<Typography paragraph>
|
||||
Aici se va descrie tehnic si detaliat ce e un reverse proxy. Poate
|
||||
contine si o poza.
|
||||
contine si o poza. Link catre swagger pe undeva
|
||||
</Typography>
|
||||
<Typography paragraph>
|
||||
Heat oil in a (14- to 16-inch) paella pan or a large, deep skillet
|
||||
|
|
|
@ -12,7 +12,7 @@ const store = configureStore();
|
|||
|
||||
render(
|
||||
<ReduxProvider store={store}>
|
||||
<Router>
|
||||
<Router basename={process.env.PUBLIC_URL}>
|
||||
<App />
|
||||
</Router>
|
||||
</ReduxProvider>,
|
||||
|
|
|
@ -5,6 +5,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
|||
const webpackBundleAnalyzer = require("webpack-bundle-analyzer");
|
||||
|
||||
process.env.NODE_ENV = "production";
|
||||
process.env.PUBLIC_URL = "/reverse-proxy";
|
||||
|
||||
module.exports = {
|
||||
mode: "production",
|
||||
|
@ -13,7 +14,7 @@ module.exports = {
|
|||
entry: "./src/index",
|
||||
output: {
|
||||
path: path.resolve(__dirname, "build"),
|
||||
publicPath: "/",
|
||||
publicPath: process.env.PUBLIC_URL,
|
||||
filename: "bundle.js"
|
||||
},
|
||||
plugins: [
|
||||
|
@ -27,6 +28,7 @@ module.exports = {
|
|||
new webpack.DefinePlugin({
|
||||
// This global makes sure React is built in prod mode.
|
||||
"process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV),
|
||||
"process.env.PUBLIC_URL": JSON.stringify(process.env.PUBLIC_URL),
|
||||
"process.env.REVERSE_PROXY_API_URL": JSON.stringify(
|
||||
"https://toodle.ddns.net/reverse-proxy-api"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue