FusionWowCMS / FusionCMS

A CMS for World of Warcraft private servers
GNU Affero General Public License v3.0
59 stars 37 forks source link

Docker Compose support #64

Open dlmw opened 1 month ago

dlmw commented 1 month ago

Is your feature request related to a problem? Please describe. My whole World of Warcraft server is running with Docker Swarm (Compose files).

Describe the solution you'd like I'd like to be able to host FusionCMS with Docker (Compose, Swarm) so that it's self-contained and my server doesn't run manually installed/configured programs. With environment variables, it should be possible to configure the whole CMS so that the user doesn't need to read the code.

Describe alternatives you've considered Installing as described in the docs.

johnthq commented 1 week ago

i too would love this <3

johnthq commented 1 day ago

ive been working on something here.


version: "3.3"

services:
  server:
    image: httpd:2.4-alpine
    ports:
      - 8588:80
    volumes:
      - /path/to/httpd.conf:/usr/local/apache2/conf/httpd.conf
      - /path/to/httpd-vhosts.conf:/usr/local/apache2/conf/extra/httpd-vhosts.conf
      - /path/to/FusionCMS/:/usr/local/apache2/htdocs/
    depends_on:
      - php-fpm
    links:
      - php-fpm

  php-fpm:
    image: joseluisq/php-fpm:8.2
    environment:
      - "ENV_SUBSTITUTION_ENABLE=true"
      - "PHP_MEMORY_LIMIT=512M"
      - "PHP_SESSION_GC_MAXLIFETIME=7200"
    volumes:
      - /path/to/FusionCMS/:/usr/local/apache2/htdocs/
    command: >
      sh -c "
        chown -R www-data:www-data /usr/local/apache2/htdocs/ &&
        chmod -R 775 /usr/local/apache2/htdocs/ &&
        cd /usr/local/apache2/htdocs/ &&
        composer install --no-plugins --no-scripts &&
        php-fpm
      "

  mariadb:
    image: mariadb:latest
    ports:
      - 3307:3306
    environment:
      MYSQL_ROOT_PASSWORD: rootpassword
      MYSQL_DATABASE: wowreg
      MYSQL_USER: wowreg
      MYSQL_PASSWORD: wowreg
    volumes:
      - /path/to/mysql:/var/lib/mysql

fixed my database import issues by not using a docker volume and instead a local mount. things seem fine now.

Nightprince commented 23 hours ago

ive been working on something here.


version: "3.3"

services:
  server:
    image: httpd:2.4-alpine
    ports:
      - 8588:80
    volumes:
      - /path/to/httpd.conf:/usr/local/apache2/conf/httpd.conf
      - /path/to/httpd-vhosts.conf:/usr/local/apache2/conf/extra/httpd-vhosts.conf
      - /path/to/FusionCMS/:/usr/local/apache2/htdocs/
    depends_on:
      - php-fpm
    links:
      - php-fpm

  php-fpm:
    image: joseluisq/php-fpm:8.2
    environment:
      - "ENV_SUBSTITUTION_ENABLE=true"
      - "PHP_MEMORY_LIMIT=512M"
      - "PHP_SESSION_GC_MAXLIFETIME=7200"
    volumes:
      - /path/to/FusionCMS/:/usr/local/apache2/htdocs/
    command: >
      sh -c "
        chown -R www-data:www-data /usr/local/apache2/htdocs/ &&
        chmod -R 775 /usr/local/apache2/htdocs/ &&
        cd /usr/local/apache2/htdocs/ &&
        composer install --no-plugins --no-scripts &&
        php-fpm
      "

  mariadb:
    image: mariadb:latest
    ports:
      - 3307:3306
    environment:
      MYSQL_ROOT_PASSWORD: rootpassword
      MYSQL_DATABASE: wowreg
      MYSQL_USER: wowreg
      MYSQL_PASSWORD: wowreg
    volumes:
      - /path/to/mysql:/var/lib/mysql

fixed my database import issues by not using a docker volume and instead a local mount. things seem fine now.

please add code to install php extensions, which includes:

'mysqli', 'curl', 'openssl', 'soap', 'gd', 'gmp', 'mbstring', 'intl', 'json', 'xml', 'zip'

and make a pull request.