It now loads again!
This commit is contained in:
parent
46617e34b2
commit
7fb4eefabc
@ -36,7 +36,7 @@ RUN npm run build
|
|||||||
COPY client /client
|
COPY client /client
|
||||||
WORKDIR /client
|
WORKDIR /client
|
||||||
ENV PUBLIC_URL="/ketr.ketran"
|
ENV PUBLIC_URL="/ketr.ketran"
|
||||||
ENV REACT_APP_API_BASE="/ketr.ketran"
|
ENV REACT_APP_API_BASE=""
|
||||||
# prefer npm ci when lockfile present, otherwise fall back to npm install
|
# prefer npm ci when lockfile present, otherwise fall back to npm install
|
||||||
RUN rm -f package-lock.json
|
RUN rm -f package-lock.json
|
||||||
RUN npm install --legacy-peer-deps --no-audit --no-fund
|
RUN npm install --legacy-peer-deps --no-audit --no-fund
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
"name": "peddlers-client",
|
"name": "peddlers-client",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"proxy": "http://peddlers-server:8930",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.11.1",
|
"@emotion/react": "^11.11.1",
|
||||||
"@emotion/styled": "^11.11.0",
|
"@emotion/styled": "^11.11.0",
|
||||||
|
@ -1,13 +1,20 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-var-requires, no-undef, @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-var-requires, no-undef, @typescript-eslint/no-explicit-any */
|
||||||
const { createProxyMiddleware } = require('http-proxy-middleware');
|
const { createProxyMiddleware } = require('http-proxy-middleware');
|
||||||
|
|
||||||
module.exports = function(app: any) {
|
module.exports = function(app) {
|
||||||
const base = process.env.PUBLIC_URL;
|
const base = process.env.PUBLIC_URL;
|
||||||
console.log(`http-proxy-middleware ${base}`);
|
console.log(`http-proxy-middleware ${base}`);
|
||||||
app.use(createProxyMiddleware(
|
app.use(createProxyMiddleware(
|
||||||
`${base}/api/v1/games/ws`, {
|
`${base}/api/v1/games/ws`, {
|
||||||
ws: true,
|
ws: true,
|
||||||
target: 'http://localhost:8930',
|
target: 'http://peddlers-server:8930',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
|
pathRewrite: { [`^${base}`]: '' },
|
||||||
}));
|
}));
|
||||||
};
|
app.use(createProxyMiddleware(
|
||||||
|
`${base}/api`, {
|
||||||
|
target: 'http://peddlers-server:8930',
|
||||||
|
changeOrigin: true,
|
||||||
|
pathRewrite: { [`^${base}`]: '' },
|
||||||
|
}));
|
||||||
|
};
|
@ -45,6 +45,9 @@ services:
|
|||||||
- BROWSER=none
|
- BROWSER=none
|
||||||
- HTTPS=true
|
- HTTPS=true
|
||||||
- HOST=0.0.0.0
|
- HOST=0.0.0.0
|
||||||
|
- WDS_SOCKET_HOST=0.0.0.0
|
||||||
|
- WDS_SOCKET_PORT=0
|
||||||
|
- REACT_APP_API_BASE=/ketr.ketran
|
||||||
command: ["bash", "-c", "cd /client && npm install --legacy-peer-deps --silent --no-audit --no-fund && npm start"]
|
command: ["bash", "-c", "cd /client && npm install --legacy-peer-deps --silent --no-audit --no-fund && npm start"]
|
||||||
networks:
|
networks:
|
||||||
- peddlers-network
|
- peddlers-network
|
||||||
|
Loading…
x
Reference in New Issue
Block a user