Create memcached.yaml

This commit is contained in:
Stefan Pejcic 2025-02-22 11:13:06 +01:00 committed by GitHub
parent 57f7db9051
commit 3e5a818fc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,26 @@
services:
memcached:
image: memcached:${MEMCACHED_VERSION:-7.4.2-alpine}
container_name: memcached
restart: unless-stopped
user: "${UID:-0}"
volumes:
- /home/${CONTEXT}/sockets/memcached:/var/run/memcached # Memcached socket
deploy:
resources:
limits:
cpus: "${MEMCACHED_CPU:-0.1}"
memory: "${MEMCACHED_RAM-0.1G}"
command: [ "memcached", "-u", "root" ]
healthcheck:
test: ["CMD", "memcached", "-h"]
interval: 30s
retries: 3
start_period: 10s
timeout: 5s
networks:
- default
networks:
default:
driver: bridge