My site based on code inside docker container with docker file like:
FROM php:7.1-fpm
RUN apt-get update && apt-get install -y libmcrypt-dev \
mysql-client libmagickwand-dev --no-install-recommends \
&& pecl install imagick \
&& docker-php-ext-enable imagick \
&& docker-php-ext-install mcrypt pdo_mysql opcache gd
#ADD php.conf/opcache.ini /etc/php/7.1/mods-available/opcache.ini
ADD build/prod/php.conf/www.conf /usr/local/etc/php-fpm.d/
ADD build/prod/php.conf/php.ini /usr/local/etc/php/
COPY . /app
WORKDIR /app
RUN chmod 777 -R storage/
RUN php artisan cache:clear && php artisan key:generate
RUN nohup php artisan queue:work &
I build CI process just creating new app container with code and kill old. But after each such "recreation", users who were login are logged out. I'm sure that this is due to fact that old container contained PHP sessions, i wanted to add them to volume, but i cloud not found them. My php.ini:
session.save_handler = files
session.use_cookies = 1
session.cookie_path = /
i use Laravel framework, my sessions.php config has:
'driver' => 'file',
'files' => storage_path('framework/sessions'),
'path' => '/',
volume to path framework/sessions not helped