mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
chore: update docker compose
This commit is contained in:
parent
2d16454370
commit
1e96221acf
4 changed files with 16 additions and 7 deletions
|
@ -5,7 +5,7 @@ tasks:
|
|||
command: |
|
||||
ENDPOINT=$(gp url 3001) docker compose -p logto up
|
||||
env:
|
||||
TAG: edge
|
||||
TAG: prerelease
|
||||
|
||||
ports:
|
||||
- name: Logto
|
||||
|
|
|
@ -3,16 +3,24 @@ version: "3.9"
|
|||
services:
|
||||
app:
|
||||
depends_on:
|
||||
- postgres
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
image: ghcr.io/logto-io/logto:${TAG-latest}
|
||||
ports:
|
||||
- 3001:3001
|
||||
environment:
|
||||
ALL_YES: 1
|
||||
NO_INQUIRY: 0
|
||||
DB_URL_DEFAULT: postgres://postgres:p0stgr3s@postgres:5432
|
||||
- ALL_YES=1
|
||||
- NO_INQUIRY=0
|
||||
- TRUST_PROXY_HEADER=1
|
||||
- DB_URL_DEFAULT=postgres://postgres:p0stgr3s@postgres:5432
|
||||
- ENDPOINT
|
||||
postgres:
|
||||
image: postgres:14-alpine
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: p0stgr3s
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
|
|
@ -5,6 +5,7 @@ import { appendPath } from '@/utils/url';
|
|||
|
||||
import createPoolByEnv from './create-pool-by-env';
|
||||
import loadOidcValues from './oidc';
|
||||
import { isTrue } from './parameters';
|
||||
|
||||
export enum MountedApps {
|
||||
Api = 'api',
|
||||
|
@ -32,7 +33,7 @@ const loadEnvValues = async () => {
|
|||
localhostUrl,
|
||||
endpoint,
|
||||
developmentUserId: getEnv('DEVELOPMENT_USER_ID'),
|
||||
trustProxyHeader: getEnv('TRUST_PROXY_HEADER') === 'true',
|
||||
trustProxyHeader: isTrue(getEnv('TRUST_PROXY_HEADER')),
|
||||
oidc: await loadOidcValues(appendPath(endpoint, '/oidc').toString()),
|
||||
adminConsoleUrl: appendPath(endpoint, '/console'),
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { getEnv } from '@silverhand/essentials';
|
||||
|
||||
const isTrue = (value: string) => ['1', 'true', 'y', 'yes', 'yep', 'yeah'].includes(value);
|
||||
export const isTrue = (value: string) => ['1', 'true', 'y', 'yes', 'yep', 'yeah'].includes(value);
|
||||
|
||||
const parameters = new Set(process.argv.slice(2));
|
||||
export const noInquiry = parameters.has('--no-inquiry') || isTrue(getEnv('NO_INQUIRY'));
|
||||
|
|
Loading…
Reference in a new issue