Merge pull request #3004 from appwrite/feat-log-limit

Docker log limit and missing preview  size env variable
This commit is contained in:
Eldad A. Fux 2022-04-10 11:02:46 +03:00 committed by GitHub
commit 60822d9232
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 0 deletions

1
.env
View file

@ -45,6 +45,7 @@ _APP_SMTP_SECURE=
_APP_SMTP_USERNAME=
_APP_SMTP_PASSWORD=
_APP_STORAGE_LIMIT=30000000
_APP_STORAGE_PREVIEW_LIMIT=20000000
_APP_FUNCTIONS_SIZE_LIMIT=30000000
_APP_FUNCTIONS_TIMEOUT=900
_APP_FUNCTIONS_BUILD_TIMEOUT=900

View file

@ -1,3 +1,10 @@
x-logging: &x-logging
logging:
driver: 'json-file'
options:
max-file: 5
max-size: 10m
<?php
$httpPort = $this->getParam('httpPort', '');
@ -36,6 +43,7 @@ services:
appwrite:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
container_name: appwrite
<<: *x-logging
restart: unless-stopped
networks:
- appwrite
@ -98,6 +106,7 @@ services:
- _APP_INFLUXDB_HOST
- _APP_INFLUXDB_PORT
- _APP_STORAGE_LIMIT
- _APP_STORAGE_PREVIEW_LIMIT
- _APP_STORAGE_ANTIVIRUS
- _APP_STORAGE_ANTIVIRUS_HOST
- _APP_STORAGE_ANTIVIRUS_PORT
@ -132,6 +141,7 @@ services:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: realtime
container_name: appwrite-realtime
<<: *x-logging
restart: unless-stopped
labels:
- "traefik.enable=true"
@ -172,6 +182,7 @@ services:
appwrite-worker-audits:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: worker-audits
<<: *x-logging
container_name: appwrite-worker-audits
restart: unless-stopped
networks:
@ -197,6 +208,7 @@ services:
appwrite-worker-webhooks:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: worker-webhooks
<<: *x-logging
container_name: appwrite-worker-webhooks
restart: unless-stopped
networks:
@ -218,6 +230,7 @@ services:
appwrite-worker-deletes:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: worker-deletes
<<: *x-logging
container_name: appwrite-worker-deletes
restart: unless-stopped
networks:
@ -259,6 +272,7 @@ services:
appwrite-worker-database:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: worker-database
<<: *x-logging
container_name: appwrite-worker-database
restart: unless-stopped
networks:
@ -284,6 +298,7 @@ services:
appwrite-worker-builds:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: worker-builds
<<: *x-logging
container_name: appwrite-worker-builds
restart: unless-stopped
networks:
@ -310,6 +325,7 @@ services:
appwrite-worker-certificates:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: worker-certificates
<<: *x-logging
container_name: appwrite-worker-certificates
restart: unless-stopped
networks:
@ -340,6 +356,7 @@ services:
appwrite-worker-functions:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: worker-functions
<<: *x-logging
container_name: appwrite-worker-functions
restart: unless-stopped
networks:
@ -369,6 +386,7 @@ services:
appwrite-executor:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: executor
<<: *x-logging
container_name: appwrite-executor
restart: unless-stopped
stop_signal: SIGINT
@ -414,6 +432,7 @@ services:
appwrite-worker-mails:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: worker-mails
<<: *x-logging
container_name: appwrite-worker-mails
restart: unless-stopped
networks:
@ -440,6 +459,7 @@ services:
appwrite-maintenance:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: maintenance
<<: *x-logging
container_name: appwrite-maintenance
restart: unless-stopped
networks:
@ -462,6 +482,7 @@ services:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: usage
container_name: appwrite-usage
<<: *x-logging
restart: unless-stopped
networks:
- appwrite
@ -488,6 +509,7 @@ services:
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
entrypoint: schedule
container_name: appwrite-schedule
<<: *x-logging
restart: unless-stopped
networks:
- appwrite
@ -503,6 +525,7 @@ services:
mariadb:
image: mariadb:10.7 # fix issues when upgrading using: mysql_upgrade -u root -p
container_name: appwrite-mariadb
<<: *x-logging
restart: unless-stopped
networks:
- appwrite
@ -518,6 +541,7 @@ services:
redis:
image: redis:6.2-alpine
container_name: appwrite-redis
<<: *x-logging
restart: unless-stopped
networks:
- appwrite
@ -536,6 +560,7 @@ services:
influxdb:
image: appwrite/influxdb:1.5.0
container_name: appwrite-influxdb
<<: *x-logging
restart: unless-stopped
networks:
- appwrite
@ -545,6 +570,7 @@ services:
telegraf:
image: appwrite/telegraf:1.4.0
container_name: appwrite-telegraf
<<: *x-logging
restart: unless-stopped
networks:
- appwrite

View file

@ -3,11 +3,19 @@
# Avoid using this file in your production environment.
# We're exposing here sensitive ports and mounting code volumes for rapid development and debugging of the server stack.
x-logging: &x-logging
logging:
driver: 'json-file'
options:
max-file: 5
max-size: 10m
version: '3'
services:
traefik:
image: traefik:2.5
<<: *x-logging
container_name: appwrite-traefik
command:
- --log.level=DEBUG
@ -37,6 +45,7 @@ services:
appwrite:
container_name: appwrite
<<: *x-logging
build:
context: .
args:
@ -152,6 +161,7 @@ services:
appwrite-realtime:
entrypoint: realtime
<<: *x-logging
container_name: appwrite-realtime
build:
context: .
@ -200,6 +210,7 @@ services:
appwrite-worker-audits:
entrypoint: worker-audits
<<: *x-logging
container_name: appwrite-worker-audits
build:
context: .
@ -228,6 +239,7 @@ services:
appwrite-worker-webhooks:
entrypoint: worker-webhooks
<<: *x-logging
container_name: appwrite-worker-webhooks
build:
context: .
@ -253,6 +265,7 @@ services:
appwrite-worker-deletes:
entrypoint: worker-deletes
<<: *x-logging
container_name: appwrite-worker-deletes
build:
context: .
@ -296,6 +309,7 @@ services:
appwrite-worker-database:
entrypoint: worker-database
<<: *x-logging
container_name: appwrite-worker-database
build:
context: .
@ -325,6 +339,7 @@ services:
appwrite-worker-builds:
entrypoint: worker-builds
<<: *x-logging
container_name: appwrite-worker-builds
build:
context: .
@ -354,6 +369,7 @@ services:
appwrite-worker-certificates:
entrypoint: worker-certificates
<<: *x-logging
container_name: appwrite-worker-certificates
build:
context: .
@ -386,6 +402,7 @@ services:
appwrite-worker-functions:
entrypoint: worker-functions
<<: *x-logging
container_name: appwrite-worker-functions
build:
context: .
@ -418,6 +435,7 @@ services:
appwrite-executor:
container_name: appwrite-executor
<<: *x-logging
entrypoint: executor
stop_signal: SIGINT
build:
@ -471,6 +489,7 @@ services:
appwrite-worker-mails:
entrypoint: worker-mails
<<: *x-logging
container_name: appwrite-worker-mails
build:
context: .
@ -502,6 +521,7 @@ services:
appwrite-maintenance:
entrypoint: maintenance
<<: *x-logging
container_name: appwrite-maintenance
build:
context: .
@ -526,6 +546,7 @@ services:
appwrite-usage:
entrypoint: usage
<<: *x-logging
container_name: appwrite-usage
build:
context: .
@ -558,6 +579,7 @@ services:
appwrite-schedule:
entrypoint: schedule
<<: *x-logging
container_name: appwrite-schedule
build:
context: .
@ -578,6 +600,7 @@ services:
mariadb:
image: mariadb:10.7 # fix issues when upgrading using: mysql_upgrade -u root -p
container_name: appwrite-mariadb
<<: *x-logging
networks:
- appwrite
volumes:
@ -606,6 +629,7 @@ services:
redis:
image: redis:6.2-alpine
<<: *x-logging
container_name: appwrite-redis
ports:
- "6379:6379"
@ -625,6 +649,7 @@ services:
influxdb:
image: appwrite/influxdb:1.5.0
container_name: appwrite-influxdb
<<: *x-logging
networks:
- appwrite
volumes:
@ -633,6 +658,7 @@ services:
telegraf:
image: appwrite/telegraf:1.4.0
container_name: appwrite-telegraf
<<: *x-logging
networks:
- appwrite
environment:
@ -655,6 +681,7 @@ services:
maildev: # used mainly for dev tests
image: appwrite/mailcatcher:1.0.0
container_name: appwrite-mailcatcher
<<: *x-logging
ports:
- '9503:1080'
networks:
@ -663,6 +690,7 @@ services:
request-catcher: # used mainly for dev tests
image: appwrite/requestcatcher:1.0.0
container_name: appwrite-requestcatcher
<<: *x-logging
ports:
- '9504:5000'
networks:
@ -671,6 +699,7 @@ services:
adminer:
image: adminer
container_name: appwrite-adminer
<<: *x-logging
restart: always
ports:
- 9506:8080