427 lines
9.6 KiB
YAML
427 lines
9.6 KiB
YAML
version: '3'
|
|
|
|
services:
|
|
traefik:
|
|
image: traefik:2.2
|
|
container_name: appwrite-traefik
|
|
command:
|
|
- --log.level=DEBUG
|
|
- --api.insecure=true
|
|
- --providers.file.directory=/storage/config
|
|
- --providers.file.watch=true
|
|
- --providers.docker=true
|
|
- --entrypoints.web.address=:80
|
|
- --entrypoints.websecure.address=:443
|
|
- --accesslog=true
|
|
restart: unless-stopped
|
|
ports:
|
|
- 2080:80
|
|
- 2443:443
|
|
- 8080:8080
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- appwrite-config:/storage/config:ro
|
|
- appwrite-certificates:/storage/certificates:ro
|
|
depends_on:
|
|
- appwrite
|
|
networks:
|
|
- gateway
|
|
- appwrite
|
|
|
|
appwrite:
|
|
container_name: appwrite
|
|
build:
|
|
context: .
|
|
args:
|
|
- TESTING=true
|
|
- VERSION=dev
|
|
restart: unless-stopped
|
|
ports:
|
|
- 9501:80
|
|
networks:
|
|
- appwrite
|
|
labels:
|
|
- traefik.http.routers.appwrite.rule=PathPrefix(`/`)
|
|
- traefik.http.routers.appwrite-secure.rule=PathPrefix(`/`)
|
|
- traefik.http.routers.appwrite-secure.tls=true
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- appwrite-uploads:/storage/uploads:rw
|
|
- appwrite-cache:/storage/cache:rw
|
|
- appwrite-config:/storage/config:rw
|
|
- appwrite-certificates:/storage/certificates:rw
|
|
- appwrite-functions:/storage/functions:rw
|
|
- ./phpunit.xml:/usr/src/code/phpunit.xml
|
|
- ./tests:/usr/src/code/tests
|
|
- ./app:/usr/src/code/app
|
|
# - ./vendor:/usr/src/code/vendor
|
|
- ./docs:/usr/src/code/docs
|
|
- ./public:/usr/src/code/public
|
|
- ./src:/usr/src/code/src
|
|
- ./debug:/tmp
|
|
depends_on:
|
|
- mariadb
|
|
- redis
|
|
# - clamav
|
|
|
|
environment:
|
|
- _APP_ENV
|
|
- _APP_OPTIONS_ABUSE
|
|
- _APP_OPTIONS_FORCE_HTTPS
|
|
- _APP_OPENSSL_KEY_V1
|
|
- _APP_DOMAIN
|
|
- _APP_DOMAIN_TARGET
|
|
- _APP_REDIS_HOST
|
|
- _APP_REDIS_PORT
|
|
- _APP_DB_HOST
|
|
- _APP_DB_PORT
|
|
- _APP_DB_SCHEMA
|
|
- _APP_DB_USER
|
|
- _APP_DB_PASS
|
|
- _APP_USAGE_STATS
|
|
- _APP_STORAGE_ANTIVIRUS=disabled
|
|
- _APP_STORAGE_LIMIT
|
|
- _APP_FUNCTIONS_TIMEOUT
|
|
- _APP_FUNCTIONS_CONTAINERS
|
|
- _APP_FUNCTIONS_CPUS
|
|
- _APP_FUNCTIONS_MEMORY
|
|
- _APP_FUNCTIONS_MEMORY_SWAP
|
|
- _APP_EXECUTOR_HOST
|
|
|
|
appwrite-worker-usage:
|
|
entrypoint: worker-usage
|
|
<<: *x-logging
|
|
container_name: appwrite-worker-usage
|
|
image: appwrite-dev
|
|
networks:
|
|
- appwrite
|
|
volumes:
|
|
- ./app:/usr/src/code/app
|
|
- ./src:/usr/src/code/src
|
|
- ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database
|
|
depends_on:
|
|
- redis
|
|
- mariadb
|
|
environment:
|
|
- _APP_ENV
|
|
- _APP_WORKER_PER_CORE
|
|
- _APP_CONNECTIONS_MAX
|
|
- _APP_POOL_CLIENTS
|
|
- _APP_OPENSSL_KEY_V1
|
|
- _APP_DB_HOST
|
|
- _APP_DB_PORT
|
|
- _APP_DB_SCHEMA
|
|
- _APP_DB_USER
|
|
- _APP_DB_PASS
|
|
- _APP_REDIS_HOST
|
|
- _APP_REDIS_PORT
|
|
- _APP_REDIS_USER
|
|
- _APP_REDIS_PASS
|
|
- _APP_CONNECTIONS_DB_CONSOLE
|
|
- _APP_CONNECTIONS_DB_PROJECT
|
|
- _APP_CONNECTIONS_CACHE
|
|
- _APP_CONNECTIONS_QUEUE
|
|
- _APP_USAGE_STATS
|
|
- DOCKERHUB_PULL_USERNAME
|
|
- DOCKERHUB_PULL_PASSWORD
|
|
|
|
appwrite-worker-audits:
|
|
entrypoint: worker-audits
|
|
container_name: appwrite-worker-audits
|
|
build:
|
|
context: .
|
|
restart: unless-stopped
|
|
networks:
|
|
- appwrite
|
|
depends_on:
|
|
- redis
|
|
- mariadb
|
|
environment:
|
|
- _APP_ENV
|
|
- _APP_REDIS_HOST
|
|
- _APP_REDIS_PORT
|
|
- _APP_DB_HOST
|
|
- _APP_DB_PORT
|
|
- _APP_DB_SCHEMA
|
|
- _APP_DB_USER
|
|
- _APP_DB_PASS
|
|
|
|
appwrite-worker-webhooks:
|
|
entrypoint: worker-webhooks
|
|
container_name: appwrite-worker-webhooks
|
|
build:
|
|
context: .
|
|
restart: unless-stopped
|
|
networks:
|
|
- appwrite
|
|
depends_on:
|
|
- redis
|
|
- mariadb
|
|
environment:
|
|
- _APP_ENV
|
|
- _APP_REDIS_HOST
|
|
- _APP_REDIS_PORT
|
|
- _APP_DB_HOST
|
|
- _APP_DB_PORT
|
|
- _APP_DB_SCHEMA
|
|
- _APP_DB_USER
|
|
- _APP_DB_PASS
|
|
|
|
appwrite-worker-tasks:
|
|
entrypoint: worker-tasks
|
|
container_name: appwrite-worker-tasks
|
|
build:
|
|
context: .
|
|
restart: unless-stopped
|
|
networks:
|
|
- appwrite
|
|
depends_on:
|
|
- redis
|
|
- mariadb
|
|
environment:
|
|
- _APP_ENV
|
|
- _APP_REDIS_HOST
|
|
- _APP_REDIS_PORT
|
|
- _APP_DB_HOST
|
|
- _APP_DB_PORT
|
|
- _APP_DB_SCHEMA
|
|
- _APP_DB_USER
|
|
- _APP_DB_PASS
|
|
|
|
appwrite-worker-deletes:
|
|
entrypoint: worker-deletes
|
|
container_name: appwrite-worker-deletes
|
|
build:
|
|
context: .
|
|
restart: unless-stopped
|
|
networks:
|
|
- appwrite
|
|
depends_on:
|
|
- redis
|
|
- mariadb
|
|
volumes:
|
|
- appwrite-uploads:/storage/uploads:rw
|
|
- appwrite-cache:/storage/cache:rw
|
|
environment:
|
|
- _APP_ENV
|
|
- _APP_REDIS_HOST
|
|
- _APP_REDIS_PORT
|
|
- _APP_DB_HOST
|
|
- _APP_DB_PORT
|
|
- _APP_DB_SCHEMA
|
|
- _APP_DB_USER
|
|
- _APP_DB_PASS
|
|
- _APP_EXECUTOR_HOST
|
|
|
|
appwrite-worker-certificates:
|
|
entrypoint: worker-certificates
|
|
container_name: appwrite-worker-certificates
|
|
build:
|
|
context: .
|
|
restart: unless-stopped
|
|
networks:
|
|
- appwrite
|
|
depends_on:
|
|
- redis
|
|
- mariadb
|
|
volumes:
|
|
- appwrite-config:/storage/config:rw
|
|
- appwrite-certificates:/storage/certificates:rw
|
|
environment:
|
|
- _APP_ENV
|
|
- _APP_REDIS_HOST
|
|
- _APP_REDIS_PORT
|
|
- _APP_DB_HOST
|
|
- _APP_DB_PORT
|
|
- _APP_DB_SCHEMA
|
|
- _APP_DB_USER
|
|
- _APP_DB_PASS
|
|
|
|
appwrite-worker-functions:
|
|
entrypoint: worker-functions
|
|
container_name: appwrite-worker-functions
|
|
build:
|
|
context: .
|
|
restart: unless-stopped
|
|
networks:
|
|
- appwrite
|
|
depends_on:
|
|
- redis
|
|
- mariadb
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- /tmp:/tmp:rw
|
|
- appwrite-functions:/storage/functions:rw
|
|
environment:
|
|
- _APP_ENV
|
|
- _APP_REDIS_HOST
|
|
- _APP_REDIS_PORT
|
|
- _APP_DB_HOST
|
|
- _APP_DB_PORT
|
|
- _APP_DB_SCHEMA
|
|
- _APP_DB_USER
|
|
- _APP_DB_PASS
|
|
- _APP_FUNCTIONS_TIMEOUT
|
|
- _APP_FUNCTIONS_CONTAINERS
|
|
- _APP_FUNCTIONS_CPUS
|
|
- _APP_FUNCTIONS_MEMORY
|
|
- _APP_FUNCTIONS_MEMORY_SWAP
|
|
- _APP_EXECUTOR_HOST
|
|
|
|
appwrite-worker-mails:
|
|
entrypoint: worker-mails
|
|
container_name: appwrite-worker-mails
|
|
build:
|
|
context: .
|
|
restart: unless-stopped
|
|
networks:
|
|
- appwrite
|
|
depends_on:
|
|
- redis
|
|
- maildev
|
|
# - smtp
|
|
environment:
|
|
- _APP_ENV
|
|
- _APP_REDIS_HOST
|
|
- _APP_REDIS_PORT
|
|
- _APP_SMTP_HOST
|
|
- _APP_SMTP_PORT
|
|
|
|
appwrite-worker-builds:
|
|
entrypoint: worker-builds
|
|
container_name: appwrite-worker-builds
|
|
build:
|
|
context: .
|
|
networks:
|
|
- appwrite
|
|
volumes:
|
|
- ./app:/usr/src/code/app
|
|
- ./src:/usr/src/code/src
|
|
depends_on:
|
|
- redis
|
|
- mariadb
|
|
environment:
|
|
- _APP_ENV
|
|
- _APP_REDIS_HOST
|
|
- _APP_REDIS_PORT
|
|
- _APP_REDIS_USER
|
|
- _APP_REDIS_PASS
|
|
- _APP_DB_HOST
|
|
- _APP_DB_PORT
|
|
- _APP_DB_SCHEMA
|
|
- _APP_DB_USER
|
|
- _APP_DB_PASS
|
|
- _APP_LOGGING_PROVIDER
|
|
- _APP_LOGGING_CONFIG
|
|
- _APP_EXECUTOR_SECRET
|
|
- _APP_EXECUTOR_HOST
|
|
|
|
appwrite-schedule:
|
|
entrypoint: schedule
|
|
container_name: appwrite-schedule
|
|
build:
|
|
context: .
|
|
restart: unless-stopped
|
|
networks:
|
|
- appwrite
|
|
depends_on:
|
|
- redis
|
|
environment:
|
|
- _APP_ENV
|
|
- _APP_REDIS_HOST
|
|
- _APP_REDIS_PORT
|
|
|
|
mariadb:
|
|
image: appwrite/mariadb:1.2.0 # fix issues when upgrading using: mysql_upgrade -u root -p
|
|
container_name: appwrite-mariadb
|
|
restart: unless-stopped
|
|
networks:
|
|
- appwrite
|
|
volumes:
|
|
- appwrite-mariadb:/var/lib/mysql:rw
|
|
ports:
|
|
- "3306:3306"
|
|
environment:
|
|
- MYSQL_ROOT_PASSWORD=rootsecretpassword
|
|
- MYSQL_DATABASE=appwrite
|
|
- MYSQL_USER=user
|
|
- MYSQL_PASSWORD=password
|
|
command: 'mysqld --innodb-flush-method=fsync'
|
|
|
|
maildev:
|
|
image: djfarrelly/maildev
|
|
container_name: appwrite-maildev
|
|
restart: unless-stopped
|
|
ports:
|
|
- '1080:80'
|
|
networks:
|
|
- appwrite
|
|
|
|
# smtp:
|
|
# image: appwrite/smtp:1.0.1
|
|
# container_name: appwrite-smtp
|
|
# restart: unless-stopped
|
|
# networks:
|
|
# - appwrite
|
|
# environment:
|
|
# - MAILNAME=appwrite
|
|
# - RELAY_NETWORKS=:192.168.0.0/24:10.0.0.0/16
|
|
|
|
redis:
|
|
image: redis:5.0
|
|
container_name: appwrite-redis
|
|
restart: unless-stopped
|
|
networks:
|
|
- appwrite
|
|
volumes:
|
|
- appwrite-redis:/data:rw
|
|
|
|
# clamav:
|
|
# image: appwrite/clamav:1.2.0
|
|
# container_name: appwrite-clamav
|
|
# restart: unless-stopped
|
|
# networks:
|
|
# - appwrite
|
|
# volumes:
|
|
# - appwrite-uploads:/storage/uploads
|
|
# redis-commander:
|
|
# image: rediscommander/redis-commander:latest
|
|
# restart: unless-stopped
|
|
# networks:
|
|
# - appwrite
|
|
# environment:
|
|
# - REDIS_HOSTS=redis
|
|
# ports:
|
|
# - "8081:8081"
|
|
|
|
# resque:
|
|
# image: registry.gitlab.com/appwrite/appwrite/resque-web:v1.0.2
|
|
# restart: unless-stopped
|
|
# networks:
|
|
# - appwrite
|
|
# ports:
|
|
# - "5678:5678"
|
|
# environment:
|
|
# - RESQUE_WEB_HOST=redis
|
|
# - RESQUE_WEB_PORT=6379
|
|
# - RESQUE_WEB_HTTP_BASIC_AUTH_USER=user
|
|
# - RESQUE_WEB_HTTP_BASIC_AUTH_PASSWORD=password
|
|
# webgrind:
|
|
# image: 'jokkedk/webgrind:latest'
|
|
# volumes:
|
|
# - './debug:/tmp'
|
|
# ports:
|
|
# - '3001:80'
|
|
|
|
networks:
|
|
gateway:
|
|
appwrite:
|
|
|
|
volumes:
|
|
appwrite-mariadb:
|
|
appwrite-redis:
|
|
appwrite-cache:
|
|
appwrite-uploads:
|
|
appwrite-certificates:
|
|
appwrite-functions:
|
|
appwrite-config:
|