Remove redunant docker volumes, remove shared docker volumes, remove renew-anon-volumes, strict filter on volume cleaning (#22780)
This commit is contained in:
Родитель
85f54d0c24
Коммит
031f7b96ac
|
@ -133,8 +133,11 @@ docker_compose_down: ## Stop the docker containers
|
|||
docker compose down --rmi local --remove-orphans --volumes
|
||||
|
||||
.PHONY: docker_clean_volumes
|
||||
docker_clean_volumes: ## Remove dangling volumes
|
||||
docker volume prune --force
|
||||
docker_clean_volumes: ## Remove dangling volumes, skipping the mysqld volume
|
||||
docker volume prune \
|
||||
--filter label=com.docker.compose.project=addons-server \
|
||||
--all \
|
||||
--force
|
||||
|
||||
.PHONY: docker_clean_images
|
||||
docker_clean_images: ## Remove dangling images
|
||||
|
|
|
@ -9,5 +9,3 @@ services:
|
|||
extends:
|
||||
service: worker
|
||||
|
||||
volumes:
|
||||
data_olympia:
|
||||
|
|
|
@ -52,12 +52,11 @@ services:
|
|||
"celery -A olympia.amo.celery:app worker -E -c 2 --loglevel=INFO",
|
||||
]
|
||||
volumes:
|
||||
- data_olympia:/data/olympia
|
||||
- .:/data/olympia
|
||||
# Don't mount generated files. They only exist in the container
|
||||
# and would otherwiser be deleted by mounbting data_olympia
|
||||
# and would otherwiser be deleted by mounting the cwd volume above
|
||||
- /data/olympia/static-build
|
||||
- /data/olympia/site-static
|
||||
- storage:/data/olympia/storage
|
||||
- ./package.json:/deps/package.json
|
||||
- ./package-lock.json:/deps/package-lock.json
|
||||
extra_hosts:
|
||||
|
@ -99,8 +98,7 @@ services:
|
|||
image: nginx
|
||||
volumes:
|
||||
- ./docker/nginx/addons.conf:/etc/nginx/conf.d/addons.conf
|
||||
- ./static:/srv/static
|
||||
- storage:/srv/user-media
|
||||
- .:/srv
|
||||
ports:
|
||||
- "80:80"
|
||||
networks:
|
||||
|
@ -143,13 +141,9 @@ services:
|
|||
- "discovery.type=single-node"
|
||||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||
mem_limit: 2g
|
||||
volumes:
|
||||
- data_elasticsearch:/usr/share/elasticsearch/data
|
||||
|
||||
redis:
|
||||
image: redis:6.2
|
||||
volumes:
|
||||
- data_redis:/data
|
||||
|
||||
rabbitmq:
|
||||
image: rabbitmq:3.12
|
||||
|
@ -160,8 +154,6 @@ services:
|
|||
- RABBITMQ_DEFAULT_USER=olympia
|
||||
- RABBITMQ_DEFAULT_PASS=olympia
|
||||
- RABBITMQ_DEFAULT_VHOST=olympia
|
||||
volumes:
|
||||
- data_rabbitmq:/var/lib/rabbitmq
|
||||
|
||||
autograph:
|
||||
image: mozilla/autograph:3.3.2
|
||||
|
@ -191,23 +183,8 @@ networks:
|
|||
default:
|
||||
|
||||
volumes:
|
||||
data_redis:
|
||||
data_elasticsearch:
|
||||
data_mysqld:
|
||||
# Keep this value in sync with Makefile-os
|
||||
# External volumes must be manually created/destroyed
|
||||
name: addons-server_data_mysqld
|
||||
external: true
|
||||
data_rabbitmq:
|
||||
data_olympia:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: ${PWD}
|
||||
storage:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: ./storage
|
||||
|
|
|
@ -20,7 +20,7 @@ server {
|
|||
}
|
||||
|
||||
location /user-media/ {
|
||||
alias /srv/user-media/shared_storage/uploads/;
|
||||
alias /srv/storage/shared_storage/uploads/;
|
||||
}
|
||||
|
||||
location ~ ^/api/ {
|
||||
|
|
Загрузка…
Ссылка в новой задаче