Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Compose support #64

Open
dlmw opened this issue Jun 10, 2024 · 4 comments
Open

Docker Compose support #64

dlmw opened this issue Jun 10, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@dlmw
Copy link

dlmw commented Jun 10, 2024

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.

@Nightprince Nightprince added the enhancement New feature or request label Jul 2, 2024
@johnthq
Copy link

johnthq commented Jul 11, 2024

i too would love this <3

@johnthq
Copy link

johnthq commented Jul 19, 2024

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
Copy link
Contributor

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.

@dlmw
Copy link
Author

dlmw commented Aug 2, 2024

Ideally, a FusionCMS Docker image should be created in order to avoid downloading the releases manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants