Opinionated Neos CMS docker image based on Alpine linux with nginx + php-fpm 7.1 + s6 process manager, packing everything needed for development and production usage of Neos in under 100mb.
The image does a few things:
- Automatically install and provision a Neos website, based on environment vars documented below
- Pack a few useful things like XDEBUG integration, git, beard etc.
- Be ready to be used in production and serve as a rolling deployment target with this Ansible script https://github.com/psmb/ansible-deploy
Check out this shell script to see what exactly this image can do for you.
This image supports following environment variable for automatically configuring Neos at container startup:
|Docker env variable||Description|
|REPOSITORY_URL||Link to Neos website distribution|
|VERSION||Git repository branch, commit SHA or release tag, defaults to
|SITE_PACKAGE||Neos website package with exported website data to be imported, optional|
|ADMIN_PASSWORD||If set, would create a Neos
|BASE_URI||If set, set the
|XDEBUG_CONFIG||Pass xdebug config string, e.g.
|IMPORT_GITHUB_PUB_KEYS||Will pull authorized keys allowed to connect to this image from your Github account(s).|
|DB_DATABASE||Database name, defaults to
|DB_HOST||Database host, defaults to
|DB_PASS||Database password, defaults to
|DB_USER||Database user, defaults to
In addition to these settings, if you place database sql dump at
Data/Persistent/db.sql, it would automatically be imported on first container launch.
beard.json file is present, your distribution will get bearded.
Example docker-compose.yml configuration:
... web: image: dimaip/docker-neos-alpine:latest ports: - '80' links: - db:db volumes: - /data environment: REPOSITORY_URL: 'https://github.com/neos/neos-development-distribution' SITE_PACKAGE: 'Neos.Demo' VERSION: '2.0' ADMIN_PASSWORD: 'password' BASE_URI: 'https://demo.com/' IMPORT_GITHUB_PUB_KEYS: 'your-github-user-name' db: image: mariadb:latest expose: - 3306 volumes: - /data environment: MYSQL_DATABASE: 'db' MYSQL_USER: 'admin' MYSQL_PASSWORD: 'pass' MYSQL_RANDOM_ROOT_PASSWORD: 'yes'