1
0
Fork 0
mirror of synced 2024-06-03 03:14:50 +12:00

Using docker volumes for better permission control

This commit is contained in:
eldadfux 2019-11-14 06:37:24 +02:00
parent 51e11d504e
commit 2d675fa357
2 changed files with 23 additions and 10 deletions

View file

@ -5,14 +5,14 @@ services:
build: . build: .
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- appwrite-uploads:/storage/uploads:rw
- appwrite-cache:/storage/cache:rw
- ./app:/usr/share/nginx/html/app - ./app:/usr/share/nginx/html/app
- ./docs:/usr/share/nginx/html/docs - ./docs:/usr/share/nginx/html/docs
- ./public:/usr/share/nginx/html/public - ./public:/usr/share/nginx/html/public
- ./src:/usr/share/nginx/html/src - ./src:/usr/share/nginx/html/src
- ./vendor:/usr/share/nginx/html/vendor - ./vendor:/usr/share/nginx/html/vendor
- ./docker/nginx.conf:/etc/nginx/nginx.conf:rw - ./docker/nginx.conf:/etc/nginx/nginx.conf:rw
- ./storage/uploads:/storage/uploads:rw
- ./storage/cache:/storage/cache:rw
ports: ports:
- "80:80" - "80:80"
- "443:443" - "443:443"
@ -47,9 +47,10 @@ services:
- MYSQL_USER=user - MYSQL_USER=user
- MYSQL_PASSWORD=password - MYSQL_PASSWORD=password
volumes: volumes:
- ./storage/db:/var/lib/mysql:rw - appwrite-db:/var/lib/mysql:rw
ports: ports:
- 3306:3306/tcp - 3306:3306/tcp
command: 'mysqld --innodb-flush-method=fsync'
smtp: smtp:
image: appwrite/smtp:1.0.0 image: appwrite/smtp:1.0.0
@ -63,7 +64,7 @@ services:
image: appwrite/clamav:1.0.4 image: appwrite/clamav:1.0.4
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ./storage:/storage:rw - appwrite-uploads:/storage/uploads
redis: redis:
image: redis:5.0 image: redis:5.0
@ -72,7 +73,7 @@ services:
influxdb: influxdb:
image: influxdb:1.6 image: influxdb:1.6
volumes: volumes:
- ./storage/influxdb:/var/lib/influxdb - appwrite-influxdb:/var/lib/influxdb:rw
ports: ports:
- "8086:8086" - "8086:8086"
@ -80,3 +81,9 @@ services:
image: appwrite/telegraf:1.0.0 image: appwrite/telegraf:1.0.0
ports: ports:
- "8125:8125/udp" - "8125:8125/udp"
volumes:
appwrite-db:
appwrite-cache:
appwrite-uploads:
appwrite-influxdb:

View file

@ -10,8 +10,8 @@ services:
- ./../../src:/usr/share/nginx/html/src - ./../../src:/usr/share/nginx/html/src
- ./../../vendor:/usr/share/nginx/html/vendor - ./../../vendor:/usr/share/nginx/html/vendor
- ./../../docker/nginx.conf:/etc/nginx/nginx.conf:rw - ./../../docker/nginx.conf:/etc/nginx/nginx.conf:rw
- ./../../storage/uploads:/storage/uploads:rw - ./../.appwrite-uploads:/storage/uploads:rw
- ./../../storage/cache:/storage/cache:rw - ./../.appwrite-cache:/storage/cache:rw
ports: ports:
- "80:80" - "80:80"
- "443:443" - "443:443"
@ -62,7 +62,7 @@ services:
image: appwrite/clamav:1.0.4 image: appwrite/clamav:1.0.4
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ./storage:/storage:rw - appwrite-uploads:/storage/uploads
redis: redis:
image: redis:5.0 image: redis:5.0
@ -71,11 +71,17 @@ services:
influxdb: influxdb:
image: influxdb:1.6 image: influxdb:1.6
volumes: volumes:
- ./storage/influxdb:/var/lib/influxdb - appwrite-influxdb:/var/lib/influxdb:rw
ports: ports:
- "8086:8086" - "8086:8086"
telegraf: telegraf:
image: appwrite/telegraf:1.0.0 image: appwrite/telegraf:1.0.0
ports: ports:
- "8125:8125/udp" - "8125:8125/udp"
volumes:
appwrite-db:
appwrite-cache:
appwrite-uploads:
appwrite-influxdb: