Giter VIP home page Giter VIP logo

Comments (5)

givanz avatar givanz commented on June 16, 2024

The folder that needs mapping is the apache htdocs folder /var/www/html

sudo docker volume create vvveb-volume
sudo docker run -p 8080:80 --mount source=vvveb-volume,target=/var/www/html vvveb/vvvebcms 

Or with docker compose

services:
  frontend:
    image: vvveb/vvvebcms:latest
    volumes:
      - vvveb-volume:/var/www/html
volumes:
  vvveb-volume:
	external: true

from vvveb.

PencilShavings avatar PencilShavings commented on June 16, 2024

You have to mount the entire site? Is there not just a data/config folder that can be bound?

Is there a way to use bind mounts? I personalty don’t find named-volumes very tangible. Having the ability to place the content wherever on the system is a necessity.

from vvveb.

givanz avatar givanz commented on June 16, 2024

You can bind /config and /public/media folders for persistent assets and config.

If you use SQLite then you can also mount the database folder storage/sqlite/.

sudo docker run -p 8080:80  \
--mount type=bind,source="$(pwd)"/config,target=/var/www/html/config  \
--mount type=bind,source="$(pwd)"/media,target=/var/www/html/public/media \
vvveb/vvvebcms 

from vvveb.

PencilShavings avatar PencilShavings commented on June 16, 2024

public/media/ & storage/sqlite/ seemed to have done part of the trick but mapping /var/www/html/config results in “Internal server error, please try again later.” with a bunch of other code. I am amusing because there are files in that directory that get removed when you mount a local directory to it.

Without it, every time I restart the container I get sent back to the initial setup process.

Error message if it’s useful:

Internal server error, please try again later. 
[Refresh page](http://localhost:8080/install//) 
Error
Error loading session driver 
File
/var/www/html/system/session.php on line 45 
Code
	public function __construct($driver, $expire = 3600) {
		$class = '\\Vvveb\\System\\Session\\' . $driver;

		if (class_exists($class)) {
			$options      = \Vvveb\config(APP . '.session', []);
			$this->driver = new $class($options);
		} else {
			throw new \Exception('Error loading session driver ' . $driver);	 // <==
		}

		return $this->driver;
	}

	public function get($key) {
Trace
#0 /var/www/html/system/session.php(33): Vvveb\System\Session->__construct(NULL)
#1 /var/www/html/system/functions.php(318): Vvveb\System\Session::getInstance()
#2 /var/www/html/install/controller/index.php(49): Vvveb\session('language')
#3 /var/www/html/system/core/frontcontroller.php(190): Vvveb\Controller\Index->__construct()
#4 /var/www/html/system/core/frontcontroller.php(298): Vvveb\System\Core\FrontController::call('Vvveb\\Controlle...', 'index', '/var/www/html/i...')
#5 /var/www/html/system/core/frontcontroller.php(364): Vvveb\System\Core\FrontController::redirect('Index', 'index')
#6 /var/www/html/system/core/startup.php(366): Vvveb\System\Core\FrontController::dispatch()
#7 /var/www/html/index.php(138): Vvveb\System\Core\start()
#8 /var/www/html/install/index.php(51): include('/var/www/html/i...')
#9 /var/www/html/public/install/index.php(26): include('/var/www/html/i...')
#10 {main}

from vvveb.

givanz avatar givanz commented on June 16, 2024

Docker does not copy the existing files into bind mounts, and because config/app.php is missing is throwing this error.

You need to connect to the container, download and unzip the cms files to copy the files to the empty bind mounts folders.

docker exec -it <mycontainer> bash
curl -Lo /tmp/vvveb.zip https://www.vvveb.com/download.php
unzip /tmp/vvveb.zip -d /var/www/html

from vvveb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.