fix(docker): fixes to allow an external url more easy
Some checks failed
Build and Push LST Docker Image / docker (push) Failing after 12s
Some checks failed
Build and Push LST Docker Image / docker (push) Failing after 12s
when running in docker we might be using a different url thats not predefined in the cors so we want to allow 1 more
This commit is contained in:
@@ -15,7 +15,7 @@ export const allowedOrigins = [
|
|||||||
`http://${process.env.PROD_SERVER}:3000`,
|
`http://${process.env.PROD_SERVER}:3000`,
|
||||||
`http://${process.env.PROD_SERVER}:3100`, // temp
|
`http://${process.env.PROD_SERVER}:3100`, // temp
|
||||||
`http://usmcd1olp082:3000`,
|
`http://usmcd1olp082:3000`,
|
||||||
`http://localhost:3600`, // internal docker
|
`${process.env.EXTERNAL_URL}`, // internal docker
|
||||||
];
|
];
|
||||||
export const lstCors = () => {
|
export const lstCors = () => {
|
||||||
return cors({
|
return cors({
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
- LOG_LEVEL=info
|
- LOG_LEVEL=info
|
||||||
|
- EXTERNAL_URL=192.168.8.222:3600
|
||||||
- DATABASE_HOST=host.docker.internal # if running on the same docker then do this
|
- DATABASE_HOST=host.docker.internal # if running on the same docker then do this
|
||||||
- DATABASE_PORT=5433
|
- DATABASE_PORT=5433
|
||||||
- DATABASE_USER=${DATABASE_USER}
|
- DATABASE_USER=${DATABASE_USER}
|
||||||
@@ -25,7 +26,6 @@ services:
|
|||||||
- PROD_PASSWORD=${PROD_PASSWORD}
|
- PROD_PASSWORD=${PROD_PASSWORD}
|
||||||
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET}
|
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET}
|
||||||
- BETTER_AUTH_URL=${URL}
|
- BETTER_AUTH_URL=${URL}
|
||||||
restart: unless-stopped
|
|
||||||
# for all host including prod servers, plc's, printers, or other de
|
# for all host including prod servers, plc's, printers, or other de
|
||||||
# extra_hosts:
|
# extra_hosts:
|
||||||
# - "${PROD_SERVER}:${PROD_IP}"
|
# - "${PROD_SERVER}:${PROD_IP}"
|
||||||
|
|||||||
@@ -19,11 +19,14 @@
|
|||||||
"start": "npm run start:server",
|
"start": "npm run start:server",
|
||||||
"start:server": "dotenvx run -f .env -- node dist/server.js",
|
"start:server": "dotenvx run -f .env -- node dist/server.js",
|
||||||
"start:docker": "node dist/server.js",
|
"start:docker": "node dist/server.js",
|
||||||
"commit": "cz",
|
|
||||||
"changeset": "changeset",
|
|
||||||
"version": "changeset version",
|
"version": "changeset version",
|
||||||
"release": "dotenvx run -f .env -- npm run version && git push --follow-tags && node scripts/create-release.js",
|
"release": "dotenvx run -f .env -- npm run version && git push --follow-tags && node scripts/create-release.js",
|
||||||
"specCheck": "node scripts/check-route-specs.mjs"
|
"specCheck": "node scripts/check-route-specs.mjs",
|
||||||
|
"commit": "cz",
|
||||||
|
"changeset": "changeset",
|
||||||
|
"changeset:add": "changeset",
|
||||||
|
"changeset:version": "changeset version",
|
||||||
|
"changeset:status": "changeset status --verbose",
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"backend",
|
"backend",
|
||||||
|
|||||||
Reference in New Issue
Block a user