It now loads again!
This commit is contained in:
parent
46617e34b2
commit
7fb4eefabc
@ -36,7 +36,7 @@ RUN npm run build
|
||||
COPY client /client
|
||||
WORKDIR /client
|
||||
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
|
||||
RUN rm -f package-lock.json
|
||||
RUN npm install --legacy-peer-deps --no-audit --no-fund
|
||||
|
@ -2,7 +2,6 @@
|
||||
"name": "peddlers-client",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"proxy": "http://peddlers-server:8930",
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.11.1",
|
||||
"@emotion/styled": "^11.11.0",
|
||||
|
@ -1,13 +1,20 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires, no-undef, @typescript-eslint/no-explicit-any */
|
||||
const { createProxyMiddleware } = require('http-proxy-middleware');
|
||||
|
||||
module.exports = function(app: any) {
|
||||
module.exports = function(app) {
|
||||
const base = process.env.PUBLIC_URL;
|
||||
console.log(`http-proxy-middleware ${base}`);
|
||||
app.use(createProxyMiddleware(
|
||||
`${base}/api/v1/games/ws`, {
|
||||
ws: true,
|
||||
target: 'http://localhost:8930',
|
||||
target: 'http://peddlers-server:8930',
|
||||
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
|
||||
- HTTPS=true
|
||||
- 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"]
|
||||
networks:
|
||||
- peddlers-network
|
||||
|
Loading…
x
Reference in New Issue
Block a user