To post a new support question, click the Post New Topic button below.
Current Version: 5.2.4 | Sytist Manual | Common  Issues | Feature Requests

Please log in or Create an account to post or reply to topics.
You will still receive notifications of replies to topics you are part of even if you do not subscribe to new topic emails.

Anyone Running Sytist In A Docker Container?

N
13 posts
Tue Aug 20, 24 5:28 AM CST

Have been running Photocart for a number of years now on a hosted VM with a Wordpress installation running on a separate VM. Recently I've migrated the Wordpress to a new host VM running via Docker and want to deploy Sytist to a container on the same VM thus consolidating resources and saving on expenditure. I'm aware of the risks here but happy to accept these given I have monitoring running on a separate service and it's a low impact should there be an outage.

Is anyone running Sytist under Docker and if so any suggestions on how to best do this and things to avoid? 

Many thanks

16,819 posts (admin)
Tue Aug 20, 24 10:42 AM CST

I have 0 experience with that. Maybe someone else has.

Tim Grissett, DIA - PicturesPro.com
My Email Address: info@picturespro.com
N
13 posts
Wed Aug 21, 24 4:16 AM CST

Thanks Tim, I'm working through this right now, building an image and once I've got all dependencies identified and installed I'll post details for future reference!

N
13 posts
Wed Aug 21, 24 9:16 AM CST

Ok, got it running in a Docker container (after migrating my database from test server to staging and setting up an external volume with images). This is the dockerfile I used to build the image:

## DockerFile for sylist image
FROM php:8.2-apache

RUN apt update && apt install -y libzip-dev libpng-dev libjpeg-dev libfreetype-dev libfreetype6-dev
RUN docker-php-ext-install mysqli
RUN docker-php-ext-install zip
RUN docker-php-ext-install exif
RUN docker-php-ext-configure gd --with-jpeg
RUN docker-php-ext-install -j$(nproc) gd

# Expose ports
EXPOSE 80
EXPOSE 443

# Set the Apache document root
ENV APACHE_DOCUMENT_ROOT=/var/www/html/

# Enable Apache modules
RUN a2enmod rewrite setenvif
RUN a2enmod headers
RUN a2dissite *
RUN a2disconf other-vhosts-access-log
RUN service apache2 restart


...and this is my docker-compose.yaml:

version: '3.9'
services:
    sytist:
    image: php-sytist:latest
    container_name: sytist
    ports:
        - 8801:80
    restart: unless-stopped
    environment:
        - SYTIST_DB_HOST=
        - SYTIST_DB_USER=$SYTIST_DB_USER
        - SYTIST_DB_PASSWORD=$SYTIST_DB_PASSWORD
        - SYTIST_DB_NAME=sytist
        - TZ=Europe/London
    volumes:
        - /docker/sytist/html:/var/www/html/


NB: That's not my complete docker compose, I've a bunch of other stuff related to the stage stack including the maria-db container and Wordpress.

I updated the variables in sy-config.php to reference the environment variables defined in the compose file and that was it. This is then frontended with Nginx Proxy Manager as only 443 is exposed on the actual server (plus I can control who can access the admin interface in NPM using a custom nginx config).

If anyone has any questions feel free to ask, however I am not a Docker expert :-)

Edited Wed Aug 21, 24 10:46 AM by Nic Box
4 total messages
Please log in or Create an account to post or reply to topics.
This post has been viewed 143 times
 
Loading more pages
Loading more pages

Sign up for email promotions.

Your information is safe with us and won't be shared.

Thank you for signing up!

 
©2003 - 2021 Grissett, LLC. All Rights Reserved.

By continuing to browse or by clicking Accept Cookies, you agree to the storing of cookies on your device necessary to provide you with the services available through our website.

    Accept   Privacy & Cookie Policy
Loading More Photos
Scroll To Top
Close Window
Loading
Close