-
Notifications
You must be signed in to change notification settings - Fork 63
Add redis to docker compose #216
Changes from all commits
40c4764
b32a7a5
c247288
c3eda47
7426fa8
7c97d49
0bab29e
e4fc17b
52acd2f
925dc97
648b6f4
9b73165
48c2f3c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # ID to uses in docker file. | ||
| PUID=1000 | ||
| PGID=1000 | ||
|
|
||
| # Timezone of the application. | ||
| TIMEZONE=UTC | ||
|
|
||
| # If `SKIP_PERMISSIONS_CHECKS` is set to "yes", the entrypoint script will not check or set the permissions of files and directories on startup. | ||
| # SKIP_PERMISSIONS_CHECKS=false | ||
|
|
||
| # Set up the cache driver, use either "redis" or "file" | ||
| # CACHE_DRIVER=redis | ||
|
|
||
| # It is safer to use file cache driver for the log viewer. | ||
| # That way, if your application is running Redis and crashes, you will still be able to access the logs. | ||
| LOG_VIEWER_CACHE_DRIVER=file | ||
|
|
||
| # Default app URL | ||
| # APP_URL=http://localhost | ||
|
|
||
| # Redis configuration | ||
| # REDIS_PORT=6379 | ||
| # REDIS_USERNAME=default | ||
| # REDIS_PASSWORD= | ||
| # REDIS_HOST=lychee_redis | ||
|
|
||
| # Database configuration | ||
| # DB_ROOT_PASSWORD=rootpassword | ||
| # DB_DATABASE=lychee | ||
| # DB_USERNAME=lychee | ||
| # DB_PASSWORD=lychee |
ildyria marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,14 +5,33 @@ | |
| #------------------------------------------- | ||
|
|
||
| services: | ||
| lychee_cache: | ||
| image: redis:alpine | ||
| container_name: lychee_redis | ||
| hostname: lychee_redis | ||
| security_opt: | ||
| - no-new-privileges:true | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "redis-cli ping || exit 1"] | ||
| ports: | ||
| - ${REDIS_PORT:-6379}:${REDIS_PORT:-6379} | ||
| user: 1026:100 | ||
| environment: | ||
| - TZ=${TIMEZONE:-UTC} | ||
| networks: | ||
| - lychee | ||
| volumes: | ||
| - cache:/data:rw | ||
| restart: on-failure:5 | ||
|
|
||
| lychee_db: | ||
| container_name: lychee_db | ||
| image: mariadb:10 | ||
| environment: | ||
| - MYSQL_ROOT_PASSWORD=<ROOT_PASSWORD> | ||
| - MYSQL_DATABASE=lychee | ||
| - MYSQL_USER=lychee | ||
| - MYSQL_PASSWORD=<LYCHEE_PASSWORD> | ||
| - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD:-rootpassword} | ||
| - MYSQL_DATABASE=${DB_DATABASE:-lychee} | ||
| - MYSQL_USER=${DB_USERNAME:-lychee} | ||
| - MYSQL_PASSWORD=${DB_PASSWORD} | ||
| expose: | ||
| - 3306 | ||
| volumes: | ||
|
|
@@ -22,7 +41,7 @@ services: | |
| restart: unless-stopped | ||
|
|
||
| lychee: | ||
| image: lycheeorg/lychee | ||
| image: lycheeorg/lychee:nightly | ||
| container_name: lychee | ||
| ports: | ||
| - 90:80 | ||
|
|
@@ -38,13 +57,13 @@ services: | |
| #- PUID=1000 | ||
| #- PGID=1000 | ||
| # PHP timezone e.g. PHP_TZ=America/New_York | ||
| - PHP_TZ=UTC | ||
| - TIMEZONE=UTC | ||
| - PHP_TZ=${TIMEZONE:-UTC} | ||
| - TIMEZONE=${TIMEZONE:-UTC} | ||
| #- APP_NAME=Laravel | ||
| #- APP_ENV=local | ||
| #- APP_DEBUG=true | ||
| #- APP_FORCE_HTTPS=false | ||
| #- APP_URL=http://localhost | ||
| - APP_URL=${APP_URL:-http://localhost} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is already the default - does this one not pass through?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it makes it easier to modify in
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But it's an env value, so wouldn't it work when modified in
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what do you mean ?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought the idea was that setting |
||
| #- APP_DIR= | ||
| #- DEBUGBAR_ENABLEd=false | ||
| #- VUEJS_ENABLED=true | ||
|
|
@@ -53,10 +72,10 @@ services: | |
| #- DB_OLD_LYCHEE_PREFIX='' | ||
| - DB_CONNECTION=mysql | ||
| - DB_HOST=lychee_db | ||
| - DB_PORT=3306 | ||
| - DB_DATABASE=lychee | ||
| - DB_USERNAME=lychee | ||
| - DB_PASSWORD=<LYCHEE_PASSWORD> | ||
| - DB_PORT=${DB_PORT:-3306} | ||
| - DB_DATABASE=${DB_DATABASE:-lychee} | ||
| - DB_USERNAME=${DB_USERNAME:-lychee} | ||
| - DB_PASSWORD=${DB_PASSWORD} | ||
| #- DB_PASSWORD_FILE=<filename> | ||
| #- DB_LOG_SQL=false | ||
| #- DB_LOG_SQL_EXPLAIN=false | ||
|
|
@@ -79,16 +98,17 @@ services: | |
| #- MAIL_FROM_NAME= | ||
| #- MAIL_FROM_ADDRESS= | ||
| #- TRUSTED_PROXIES= | ||
| #- SKIP_PERMISSIONS_CHECKS | ||
| - SKIP_PERMISSIONS_CHECKS=${SKIP_PERMISSIONS_CHECKS:-false} | ||
d7415 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - STARTUP_DELAY=30 | ||
| #- ADMIN_USER=admin | ||
| #- ADMIN_PASSWORD=<ADMIN_PASSWORD> | ||
| #- ADMIN_PASSWORD_FILE=<filename> | ||
| ### Unused in Lychee | ||
| #- REDIS_HOST=127.0.0.1 | ||
| #- REDIS_PASSWORD=null | ||
| #- REDIS_PASSWORD_FILE=<filename> | ||
| #- REDIS_PORT=6379 | ||
| - CACHE_DRIVER=${CACHE_DRIVER:-redis} | ||
| - REDIS_URL=redis://${REDIS_USERNAME:-default}:${REDIS_PASSWORD:-}@${REDIS_HOST:-lychee_redis}:${REDIS_PORT:-6379} | ||
ildyria marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - REDIS_HOST=${REDIS_HOST:-lychee_redis} | ||
| - REDIS_PORT=${REDIS_PORT:-6379} | ||
| - REDIS_PASSWORD=${REDIS_PASSWORD:-} | ||
| - LOG_VIEWER_CACHE_DRIVER=${LOG_VIEWER_CACHE_DRIVER:-file} | ||
ildyria marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| restart: unless-stopped | ||
| depends_on: | ||
| - lychee_db | ||
|
|
@@ -98,3 +118,8 @@ networks: | |
|
|
||
| volumes: | ||
| mysql: | ||
| name: lychee_prod_mysql | ||
| driver: local | ||
| cache: | ||
| name: lychee_prod_redis | ||
| driver: local | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to object to this, but I guess these overrides aren't really needed any more (unless someone really knows what they're doing, and so can figure it out easily enough).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it, the main reason I am dropping it is because Lychee now supports upload by chunks, as a result the limit on post request is no longer an issue for large files. :)