Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Sleep if no app_key set. Add dummy app_key to CI
  • Loading branch information
thespad committed Jun 7, 2024
commit e22556d0ef160ddba21c7aa6deff4c146f25aa78
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pipeline {
CI_PORT='80'
CI_SSL='false'
CI_DELAY='60'
CI_DOCKERENV=''
CI_DOCKERENV='APP_KEY=base64:w4fvYUSRozulci8bYVk9wCaRVge3PMF7ixo9fDz9T7o='
CI_AUTH=''
CI_WEBPATH=''
}
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ services:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- APP_KEY=
- DB_CONNECTION=sqlite
- APP_KEY= #optional
- DB_HOST= #optional
- DB_PORT= #optional
- DB_DATABASE= #optional
Expand All @@ -99,8 +99,8 @@ docker run -d \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e APP_KEY= \
-e DB_CONNECTION=sqlite \
-e APP_KEY= `#optional` \
-e DB_HOST= `#optional` \
-e DB_PORT= `#optional` \
-e DB_DATABASE= `#optional` \
Expand All @@ -122,8 +122,8 @@ Containers are configured using parameters passed at runtime (such as those abov
| `-e PUID=1000` | for UserID - see below for explanation |
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
| `-e APP_KEY=` | App key used for encrypting stored data. You can generate a key at [https://speedtest-tracker.dev](https://speedtest-tracker.dev) |
| `-e DB_CONNECTION=sqlite` | Set the database type to use. `sqlite`, `pgsql`, or `mysql` |
| `-e APP_KEY=` | App key used for encrypting stored data. Generate with `docker exec speedtest-tracker php /app/www/artisan key:generate --show` |
| `-e DB_HOST=` | Database hostname (postgres/mysql). |
| `-e DB_PORT=` | Database port (postgres/mysql). |
| `-e DB_DATABASE=` | Database name (postgres/mysql). |
Expand Down Expand Up @@ -292,6 +292,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **07.06.24:** - Cache Filament components and added APP_KEY as a required param.
* **27.05.24:** - Existing users should update their nginx confs to avoid http2 deprecation warnings.
* **24.05.24:** - Rebase to Alpine 3.20.
* **16.04.24:** - Rebase to Alpine 3.19, upgrade to php 8.3.
Expand Down
2 changes: 1 addition & 1 deletion jenkins-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repo_vars:
- CI_PORT='80'
- CI_SSL='false'
- CI_DELAY='60'
- CI_DOCKERENV=''
- CI_DOCKERENV='APP_KEY=base64:w4fvYUSRozulci8bYVk9wCaRVge3PMF7ixo9fDz9T7o='
- CI_AUTH=''
- CI_WEBPATH=''
sponsor_links:
Expand Down
2 changes: 1 addition & 1 deletion readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ common_param_env_vars_enabled: true
param_container_name: "{{ project_name }}"
param_usage_include_env: true
param_env_vars:
- { env_var: "APP_KEY", env_value: "", desc: "App key used for encrypting stored data. You can generate a key at https://speedtest-tracker.dev" }
- { env_var: "APP_KEY", env_value: "", desc: "App key used for encrypting stored data. You can generate a key at [https://speedtest-tracker.dev](https://speedtest-tracker.dev)" }
- { env_var: "DB_CONNECTION", env_value: "sqlite", desc: "Set the database type to use. `sqlite`, `pgsql`, or `mysql`" }
param_usage_include_vols: true
param_volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ fi
# Check for app key
if [[ -z ${APP_KEY} ]]; then
if ! grep -qE "APP_KEY=[0-9A-Za-z:+\/=]{1,}" /app/www/.env 2> /dev/null; then
echo "An application key is missing!"
echo "An application key is missing, halting init!"
echo "You can generate a key at https://speedtest-tracker.dev/."
sleep infinity
fi
fi

Expand Down