A Docker image for the ingenious Neos CMS.
Use this image as a base for your own custom Neos image by specifying it in a FROM instruction:
FROM mcstreetguy/neos-dockerized:4.3
As Neos requires a database to be present, you need to provide the neccessary credentials for the image to work. Using the ONBUILD instructions, this image already sets up the required build arguments in your child image. These include:
Argument | Description | Default Value |
---|---|---|
DB_HOST |
The hostname or ip address of the database server. | none |
DB_PORT |
The port on the database server to connect to. | 3306 |
DB_NAME |
The database name to use. | db_neos |
DB_USER |
The username for the database conncetion | usr_neos |
DB_PASS |
The password for the database connection | none |
All values with a default value of none
are mandatory and may not be omitted!
Otherwise the container might complain during startup and fail with an error message.
As the demo installation is not what we want to install in most cases, there is of course an option to install your own Neos project inside this container.
The initial setup will check if a composer.json
file is present in the /var/www/neos
directory and otherwise run the compose create-project
command to initialize the project.
This means in turn that you simply can copy the composer.json
file of your project to the named directory to make the container install your own project.
COPY /path/to/my/composer.json /var/www/neos/
Please note at this point, that you may not override the Configuration/Settings.yaml
file, as it is required for the container to work properly!
You may provide your custom configuration inside the context subdirectories of the Configuration
folder.
It is strongly recommended to provide the same configuration inside Configuration/Development
and Configuration/Production
as the Flow CLI runs in the latter context, whereas the Apache webserver is set to Production
by default. This ensures consistency between all contexts.
COPY /path/to/my/Settings.yaml /var/www/neos/Configuration/Development/
COPY /path/to/my/Settings.yaml /var/www/neos/Configuration/Production/