update 6 docker CI

This commit is contained in:
root
2026-03-09 17:01:24 -04:00
parent d7d718c469
commit d9567f925f
2 changed files with 21 additions and 1 deletions
+20
View File
@@ -18,3 +18,23 @@ ENV APP_DIR=/app
WORKDIR ${APP_DIR} WORKDIR ${APP_DIR}
COPY . ${APP_DIR} COPY . ${APP_DIR}
RUN printf '%s\n' \
'#!/bin/sh' \
'set -e' \
'if [ -z "${APP_KEY:-}" ]; then' \
' if command -v php >/dev/null 2>&1; then' \
' APP_KEY=$(php -r '"'"'echo "base64:" . base64_encode(random_bytes(32));'"'"')' \
' elif command -v openssl >/dev/null 2>&1; then' \
' APP_KEY=$(openssl rand -base64 32 | sed "s/^/base64:/")' \
' else' \
' echo "APP_KEY is required but php/openssl is unavailable." >&2' \
' exit 1' \
' fi' \
' export APP_KEY' \
'fi' \
'exec "$@"' \
> /usr/local/bin/ci-entrypoint \
&& chmod +x /usr/local/bin/ci-entrypoint
ENTRYPOINT ["ci-entrypoint"]
+1 -1
View File
@@ -7,7 +7,7 @@ services:
working_dir: /app working_dir: /app
environment: environment:
APP_ENV: testing APP_ENV: testing
APP_KEY: base64:testingKey123456789012345678901234567890= APP_KEY: ${APP_KEY:-}
DB_CONNECTION: sqlite DB_CONNECTION: sqlite
DB_DATABASE: /app/database/database.sqlite DB_DATABASE: /app/database/database.sqlite
CACHE_DRIVER: array CACHE_DRIVER: array