Skip to content
This repository was archived by the owner on Jan 7, 2026. It is now read-only.

Commit 0ed9a06

Browse files
authored
Fix path subfolder and inject more env (#237)
1 parent 6a149cb commit 0ed9a06

File tree

4 files changed

+36
-17
lines changed

4 files changed

+36
-17
lines changed

.env.example

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ LOG_VIEWER_CACHE_DRIVER=file
1818
# Default app URL
1919
# APP_URL=http://localhost
2020

21+
# If using Lychee in a sub folder, specify the path after the tld here.
22+
# For example for https://lychee.test/path/to/lychee
23+
# Set APP_URL=https://lychee.test
24+
# and APP_DIR=/path/to/lychee
25+
# and ASSET_URL=https://lychee.test/path/to/lychee
26+
# We (LycheeOrg) ABSOLUTELY DO NOT RECOMMEND the use of APP_DIR.
27+
# APP_DIR=/path/to/lychee
28+
# ASSET_URL=http://example.com/path/to/lychee
29+
2130
# Redis configuration
2231
# REDIS_PORT=6379
2332
# REDIS_USERNAME=default
@@ -32,4 +41,11 @@ LOG_VIEWER_CACHE_DRIVER=file
3241

3342
# Allows to use remote connection via vite proxy.
3443
# This disables the graceful handling of sessions expirations.
35-
# VITE_HTTP_PROXY_ENABLED=false
44+
# VITE_HTTP_PROXY_ENABLED=false
45+
46+
# Disable Basic Auth. This means that the only way to authenticate is via the API token or Oauth.
47+
# This should only be toggled AFTER having set up the admin account and bound the Oauth client.
48+
# DISABLE_BASIC_AUTH=false
49+
50+
# Disable WebAuthn. This means that the only way to authenticate is via the API token, Basic Auth or OAuth.
51+
# DISABLE_WEBAUTHN=false

.github/workflows/test_pull.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@ jobs:
3131
uses: actions/github-script@v7
3232
with:
3333
script: |
34-
var artifacts = await github.actions.listWorkflowRunArtifacts({
34+
let artifacts = await github.rest.actions.listWorkflowRunArtifacts({
3535
owner: context.repo.owner,
3636
repo: context.repo.repo,
37-
run_id: ${{ github.event.workflow_run.id }},
37+
run_id: context.payload.workflow_run.id,
3838
});
39-
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
39+
let matchArtifact = artifacts.data.artifacts.filter((artifact) => {
4040
return artifact.name == "artifact"
4141
})[0];
42-
var download = await github.actions.downloadArtifact({
42+
let download = await github.actions.downloadArtifact({
4343
owner: context.repo.owner,
4444
repo: context.repo.repo,
4545
artifact_id: matchArtifact.id,
4646
archive_format: 'zip',
4747
});
48-
var fs = require('fs');
48+
const fs = require('fs');
4949
fs.writeFileSync('${{github.workspace}}/artifact.zip', Buffer.from(download.data));
5050
-
5151
name: "Unzip"

docker-compose.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,11 @@ services:
7777
#- APP_DEBUG=true
7878
#- APP_FORCE_HTTPS=false
7979
- APP_URL=${APP_URL:-http://localhost}
80+
# If using Lychee in a sub folder, specify the path after the tld here.
81+
# We do not recommend the use of APP_DIR and ASSET_URL.
8082
#- APP_DIR=
83+
#- ASSET_URL=
8184
#- DEBUGBAR_ENABLEd=false
82-
#- VUEJS_ENABLED=true
83-
#- LEGACY_API_ENABLED=false
8485
#- LEGACY_V4_REDIRECT=false
8586
#- DB_OLD_LYCHEE_PREFIX=''
8687
- DB_CONNECTION=mysql
@@ -124,6 +125,8 @@ services:
124125
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
125126
- LOG_VIEWER_CACHE_DRIVER=${LOG_VIEWER_CACHE_DRIVER:-file}
126127
- VITE_HTTP_PROXY_ENABLED=${VITE_HTTP_PROXY_ENABLED:-false}
128+
- DISABLE_BASIC_AUTH=${DISABLE_BASIC_AUTH:-false}
129+
- DISABLE_WEBAUTHN=${DISABLE_WEBAUTHN:-false}
127130
restart: unless-stopped
128131
depends_on:
129132
- lychee_db

inject.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,12 @@ if [ "$APP_FORCE_HTTPS" != '' ]; then
2525
if [ "$APP_DIR" != '' ]; then
2626
replace_or_insert "APP_DIR" "$APP_DIR"
2727
fi
28+
if [ "$ASSET_URL" != '' ]; then
29+
replace_or_insert "ASSET_URL" "$ASSET_URL"
30+
fi
2831
if [ "$DEBUGBAR_ENABLED" != '' ]; then
2932
replace_or_insert "DEBUGBAR_ENABLED" "$DEBUGBAR_ENABLED"
3033
fi
31-
if [ "$LIVEWIRE_ENABLED" != '' ]; then
32-
replace_or_insert "LIVEWIRE_ENABLED" "$LIVEWIRE_ENABLED"
33-
fi
34-
if [ "$VUEJS_ENABLED" != '' ]; then
35-
replace_or_insert "VUEJS_ENABLED" "$VUEJS_ENABLED"
36-
fi
3734
if [ "$LEGACY_API_ENABLED" != '' ]; then
3835
replace_or_insert "LEGACY_API_ENABLED" "$LEGACY_API_ENABLED"
3936
fi
@@ -46,9 +43,6 @@ if [ "$S3_ENABLED" != '' ]; then
4643
if [ "$LEGACY_V4_REDIRECT" != '' ]; then
4744
replace_or_insert "LEGACY_V4_REDIRECT" "$LEGACY_V4_REDIRECT"
4845
fi
49-
if [ "$PHOTO_PIPES" != '' ]; then
50-
replace_or_insert "PHOTO_PIPES" "$PHOTO_PIPES"
51-
fi
5246
if [ "$DB_OLD_LYCHEE_PREFIX" != '' ]; then
5347
replace_or_insert "DB_OLD_LYCHEE_PREFIX" "$DB_OLD_LYCHEE_PREFIX"
5448
fi
@@ -346,4 +340,10 @@ if [ "$PHP_TZ" != '' ]; then
346340
fi
347341
if [ "$VITE_HTTP_PROXY_ENABLED" != '' ]; then
348342
replace_or_insert "VITE_HTTP_PROXY_ENABLED" "$VITE_HTTP_PROXY_ENABLED"
343+
fi
344+
if [ "$DISABLE_BASIC_AUTH" != '' ]; then
345+
replace_or_insert "DISABLE_BASIC_AUTH" "$DISABLE_BASIC_AUTH"
346+
fi
347+
if [ "$DISABLE_WEBAUTHN" != '' ]; then
348+
replace_or_insert "DISABLE_WEBAUTHN" "$DISABLE_WEBAUTHN"
349349
fi

0 commit comments

Comments
 (0)