From 68e5ba412aa0f7db77bf763cc668ff4754a33d1a Mon Sep 17 00:00:00 2001 From: Natalie McCallum Date: Wed, 13 Aug 2025 19:29:05 +1000 Subject: [PATCH] Attempt to persist cache between restarts --- .gitignore | 1 + docker-compose.yml | 19 +++++-------------- docker/build-server/Dockerfile | 2 -- etc-docker/lacuna.conf | 4 ---- 4 files changed, 6 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 6c2b78a6..04ec9bdc 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ etc-docker/logs/ tmp/ log/ captcha/ +memcached/ diff --git a/docker-compose.yml b/docker-compose.yml index 84d95ea4..ccdaa93b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,6 +32,11 @@ services: lacuna-memcached: container_name: 'lacuna-memcached' image: 'memcached' + command: + # Persist cache in a file to save sessions (and other data) between restarts of the docker container + - --memory-file /tempfs_mount/memory_file + volumes: + - ./memcached:/tempfs_mount ################## ## MYSQL SERVER ## @@ -91,16 +96,6 @@ services: # - ./app/dist/app:/home/lacuna/server/var/www/public/app - ./app/dist:/home/lacuna/server/var/www/public/app - ########### - ## REDIS ## - ########### - - lacuna-redis: - container_name: 'lacuna-redis' - image: redis - ports: - - '6379:6379' - ######### ## APP ## ######### @@ -132,7 +127,6 @@ services: depends_on: - 'lacuna-mysql-server' - 'lacuna-phpmyadmin' - - 'lacuna-redis' - 'lacuna-memcached' - 'lacuna-beanstalkd' environment: @@ -159,7 +153,6 @@ services: depends_on: - 'lacuna-mysql-server' - 'lacuna-phpmyadmin' - - 'lacuna-redis' - 'lacuna-memcached' - 'lacuna-beanstalkd' volumes: @@ -182,7 +175,6 @@ services: depends_on: - 'lacuna-mysql-server' - 'lacuna-phpmyadmin' - - 'lacuna-redis' - 'lacuna-memcached' - 'lacuna-beanstalkd' volumes: @@ -205,7 +197,6 @@ services: depends_on: - 'lacuna-mysql-server' - 'lacuna-phpmyadmin' - - 'lacuna-redis' - 'lacuna-memcached' - 'lacuna-beanstalkd' volumes: diff --git a/docker/build-server/Dockerfile b/docker/build-server/Dockerfile index b1060080..179bdcd9 100644 --- a/docker/build-server/Dockerfile +++ b/docker/build-server/Dockerfile @@ -47,7 +47,6 @@ RUN groupadd nogroup # RUN cpanm --notest AnyEvent::Beanstalk RUN cpanm --notest AnyEvent::Beanstalk -RUN cpanm --notest AnyEvent::Redis RUN cpanm --notest AnyEvent::WebSocket::Client RUN cpanm --notest AnyEvent::WebSocket::Server RUN cpanm --notest App::Daemon @@ -122,7 +121,6 @@ RUN cpanm --notest Plack::Handler::Twiggy RUN cpanm --notest Plack::Middleware::CrossOrigin RUN cpanm --notest Plack::Middleware::Headers RUN cpanm --notest Pod::Simple::HTML -RUN cpanm --notest Redis RUN cpanm --notest Regexp::Common RUN cpanm --notest rlib MooseX::App RUN cpanm --notest Server::Starter SOAP::Lite diff --git a/etc-docker/lacuna.conf b/etc-docker/lacuna.conf index e08930bb..94b0aaa9 100644 --- a/etc-docker/lacuna.conf +++ b/etc-docker/lacuna.conf @@ -112,10 +112,6 @@ "Sandbox" : "0", "Signature" : "XXXX" }, - "redis" : { - "host" : "lacuna-redis", - "port" : 6379 - }, "rpc_limit" : 10000, "rpc_throttle" : 200, "self_destruct_after_inactive_days" : 9999999, -- 2.51.2