Browse Source

+ directus docker service for mi project with nginx config

master
dimti 3 months ago
parent
commit
33a0756530
  1. 18
      config/nginx/conf.d/z-directus.conf.example
  2. 42
      docker-compose.directus.yml.example

18
config/nginx/conf.d/z-directus.conf.example

@ -0,0 +1,18 @@
map $http_host $directus {
directus-mi.local.wpstudio.ru directus-mi;
}
server {
listen 80;
server_name
directus-mi.local.wpstudio.ru
;
location / {
resolver 127.0.0.11;
proxy_pass http://$directus:8055;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}

42
docker-compose.directus.yml.example

@ -0,0 +1,42 @@
services:
directus-mi:
image: directus/directus:11.1.0
ports:
- 8055:8055
volumes:
- ./data/directus/mi/uploads:/directus/uploads
- ./data/directus/mi/extensions:/directus/extensions
depends_on:
- db
- redis-mi
environment:
KEY: ""
SECRET: ""
DB_CLIENT: "mysql"
DB_HOST: "db"
DB_PORT: "3306"
DB_DATABASE: "directus"
DB_USER: "directus"
DB_PASSWORD: "directus"
CACHE_ENABLED: "true"
CACHE_AUTO_PURGE: "true"
CACHE_STORE: "redis"
REDIS: "redis://redis-mi:6379"
CACHE_TTL: 1d
ADMIN_EMAIL: "info@wpstudio.ru"
ADMIN_PASSWORD: ""
TELEMETRY: false
ACCESS_TOKEN_TTL: 15m
REFRESH_TOKEN_TTL: 7d
LOG_LEVEL: debug
FLOWS_EXEC_ALLOWED_MODULES: "array:@elastic/elasticsearch"
WEBSOCKETS_ENABLED: true
# Make sure to set this in production
# (see https://docs.directus.io/self-hosted/config-options#general)
# PUBLIC_URL: "https://directus.example.com"
Loading…
Cancel
Save