mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
chore: update configs (#3190)
This commit is contained in:
parent
a63e79c8b4
commit
518579efce
4 changed files with 10 additions and 6 deletions
|
@ -5,6 +5,8 @@ tasks:
|
|||
|
||||
- name: Logto dev
|
||||
init: |
|
||||
nvm i 18
|
||||
nvm use 18
|
||||
pnpm i
|
||||
pnpm prepack
|
||||
cd packages/core
|
||||
|
@ -15,6 +17,7 @@ tasks:
|
|||
gp ports await 5432
|
||||
sleep 3
|
||||
export ENDPOINT=$(gp url 3001)
|
||||
export ADMIN_ENDPOINT=$(gp url 3002)
|
||||
pnpm cli db seed
|
||||
pnpm start:dev
|
||||
env:
|
||||
|
@ -26,6 +29,10 @@ ports:
|
|||
description: The Logto core service
|
||||
port: 3001
|
||||
visibility: public
|
||||
- name: Admin Console
|
||||
description: The Admin Console for Logto core service
|
||||
port: 3002
|
||||
visibility: public
|
||||
- name: Postgres
|
||||
port: 5432
|
||||
visibility: public
|
||||
|
|
|
@ -22,7 +22,7 @@ RUN pnpm i
|
|||
ENV CONSOLE_PUBLIC_URL=/
|
||||
ENV IS_CLOUD=1
|
||||
# Temporarily use it for Admin Console build, will try to use runtime technique later
|
||||
ENV ADMIN_TENANT_ENDPOINT=https://admin.app.logto.dev/
|
||||
ENV ADMIN_ENDPOINT=https://admin.app.logto.dev/
|
||||
RUN pnpm prepack
|
||||
RUN pnpm -r --filter @logto/console --filter @logto/cloud build
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
const getEnv = (key: string) => process.env[key];
|
||||
|
||||
class GlobalValues {
|
||||
public readonly logtoEndpoint = new URL(
|
||||
getEnv('ADMIN_TENANT_ENDPOINT') ?? 'http://localhost:3002'
|
||||
);
|
||||
public readonly logtoEndpoint = new URL(getEnv('ADMIN_ENDPOINT') ?? 'http://localhost:3002');
|
||||
|
||||
public readonly dbUrl = getEnv('DB_URL');
|
||||
public readonly isProduction = getEnv('NODE_ENV') === 'production';
|
||||
|
|
|
@ -7,8 +7,7 @@ import { isCloud } from './cloud';
|
|||
const isProduction = process.env.NODE_ENV === 'production';
|
||||
|
||||
export const adminTenantEndpoint =
|
||||
process.env.ADMIN_TENANT_ENDPOINT ??
|
||||
(isProduction ? window.location.origin : 'http://localhost:3002');
|
||||
process.env.ADMIN_ENDPOINT ?? (isProduction ? window.location.origin : 'http://localhost:3002');
|
||||
|
||||
export const getUserTenantId = () => {
|
||||
if (isCloud) {
|
||||
|
|
Loading…
Reference in a new issue