docker compose corrections
This commit is contained in:
parent
76162f842b
commit
d6721f7af3
6
.env
6
.env
@ -1,3 +1,3 @@
|
||||
KC_URL="https://auth-dev.csi.wmi.amu.edu.pl/"
|
||||
KC_REALM="gonito-dev"
|
||||
KC_CLIENT_ID="gonito-dev-heroku"
|
||||
REACT_APP_KC_URL=https://auth-dev.csi.wmi.amu.edu.pl/
|
||||
REACT_APP_KC_REALM=gonito-dev
|
||||
REACT_APP_KC_CLIENT_ID=gonito-dev-heroku
|
||||
|
@ -12,9 +12,11 @@ COPY package.json ./
|
||||
COPY package-lock.json ./
|
||||
RUN npm install --silent
|
||||
RUN npm install react-scripts@3.4.1 -g --silent
|
||||
RUN npm install -g serve --save
|
||||
RUN npm audit fix
|
||||
|
||||
# add app
|
||||
COPY . ./
|
||||
COPY . /app/
|
||||
|
||||
# start app
|
||||
CMD ["npm", "start"]
|
||||
|
@ -1,16 +1,14 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
|
||||
sample:
|
||||
container_name: gonito
|
||||
gonito:
|
||||
container_name: gonito_frontend
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
# volumes:
|
||||
# - '.:/app'
|
||||
# - '/app/node_modules'
|
||||
ports:
|
||||
- 3001:3000
|
||||
- 3000:3000
|
||||
environment:
|
||||
- CHOKIDAR_USEPOLLING=true
|
||||
- CHOKIDAR_USEPOLLING=true
|
||||
- REACT_APP_KC_URL=${REACT_APP_KC_URL}
|
||||
- REACT_APP_KC_REALM=${REACT_APP_KC_REALM}
|
||||
- REACT_APP_KC_CLIENT_ID=${REACT_APP_KC_CLIENT_ID}
|
28
package-lock.json
generated
28
package-lock.json
generated
@ -6619,14 +6619,6 @@
|
||||
"tslib": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/dotenv": {
|
||||
"version": "10.0.0",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
|
||||
"integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/dotenv-expand": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz",
|
||||
@ -14245,6 +14237,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/react-scripts/node_modules/dotenv": {
|
||||
"version": "10.0.0",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
|
||||
"integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/read-cache": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
|
||||
@ -21726,11 +21726,6 @@
|
||||
"tslib": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"dotenv": {
|
||||
"version": "10.0.0",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
|
||||
"integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q=="
|
||||
},
|
||||
"dotenv-expand": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz",
|
||||
@ -27080,6 +27075,13 @@
|
||||
"webpack-dev-server": "^4.6.0",
|
||||
"webpack-manifest-plugin": "^4.0.2",
|
||||
"workbox-webpack-plugin": "^6.4.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"dotenv": {
|
||||
"version": "10.0.0",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
|
||||
"integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"read-cache": {
|
||||
|
@ -39,5 +39,22 @@
|
||||
To begin the development, run `npm start` or `yarn start`.
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
-->
|
||||
<script>
|
||||
{
|
||||
var WS = window.WebSocket;
|
||||
|
||||
function DevWebSocket(s) {
|
||||
if (s === "ws://localhost:3000/sockjs-node") {
|
||||
console.info("[DEV NOTICE] Live Reload Has Been Disabled");
|
||||
return {};
|
||||
} else {
|
||||
// Pass through other usage of sockets
|
||||
return new WS(s);
|
||||
}
|
||||
}
|
||||
|
||||
window.WebSocket = DevWebSocket;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,9 +1,9 @@
|
||||
import Keycloak from 'keycloak-js';
|
||||
|
||||
const _kc = new Keycloak({
|
||||
url: 'https://auth-dev.csi.wmi.amu.edu.pl/',
|
||||
realm: 'gonito-dev',
|
||||
clientId: 'gonito-dev-heroku'
|
||||
url: process.env.REACT_APP_KC_URL,
|
||||
realm: process.env.REACT_APP_KC_REALM,
|
||||
clientId: process.env.REACT_APP_KC_CLIENT_ID
|
||||
});
|
||||
|
||||
const initKeycloak = (onAuthenticatedCallback) => {
|
||||
|
Loading…
Reference in New Issue
Block a user