patriceckhart/docker-neos

By patriceckhart

Updated about 1 year ago

Neos CMS 🐳 docker image based on Alpine linux with nginx + php-fpm 7.4, 8.0, 8.1, 8.2, 8.3, 8.4

Image
Languages & frameworks
Developer tools
Web servers
0

5.7K

patriceckhart/docker-neos repository overview

patriceckhart/docker-neos

Neos CMS 🐳 docker image based on Alpine linux with nginx + php-fpm 8.4 🚀, packing everything needed for development and production usage of Neos.

The image does a few things:

Automatically provision a Neos CMS website or a Neos Flow application, based on environment vars documented below. Pack a few useful things like git, redis, ...

Usage

This image supports following environment variable for automatically configuring Neos at container startup:

Required env vars
Docker env varDescription
GITHUB_REPOSITORYLink to Neos CMS website distribution
GITHUB_USERNAMEWill pull authorized keys allowed to connect to the container via ssh
FLOW_CONTEXTDevelopment or Production
IMAGINE_DRIVERImagick or Vips
PHP_UPLOAD_MAX_FILESIZEPHP upload maximum filesize eg. 10M
PHP_MEMORY_LIMITPHP memory limit e.g. 512M
NGINX_CLIENT_BODY_SIZENginx client body size e.g. 512M
Example docker-compose.yml configuration
web:
  image: patriceckhart/docker-neos:8.4
  ports:
    - '80'
    - '22:22'
  links:
    - mariadb:mariadb
  volumes:
    - /data
  environment:
    GITHUB_USERNAME: 'patriceckhart'
    GITHUB_TOKEN: 'yourgithubtoken'
    GITHUB_REPOSITORY: 'https://github.com/patriceckhart/NeosCMS-Boilerplate.git'
    GITHUB_REPOSITORY_BRANCH: '7.3'
    SITE_PACKAGE: 'Raw.Site'
    DB_DATABASE: 'db'
    DB_USER: 'admin'
    DB_PASS: 'password'
    DB_HOST: 'db'
    VIRTUAL_HOST: neos.dockyard.local
    PHP_TIMEZONE: 'Europe/Berlin'
    NGINX_CLIENT_BODY_SIZE: '512M'
    PHP_MEMORY_LIMIT: '512M'
    PHP_UPLOAD_MAX_FILESIZE: '10M'
    PHP_MAX_EXECUTION_TIME: 240
    PHP_MAX_INPUT_VARS: 1500
    IMAGINE_DRIVER: 'Imagick'
    FLOW_CONTEXT: 'Development'
    
mariadb:
  image: mariadb:latest
  expose:
    - 3306
  volumes:
    - /var/lib/data
  environment:
    MYSQL_DATABASE: 'neos'
    MYSQL_ROOT_PASSWORD: 'dockyard'
  ports:
    - '3306:3306'
  command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
Cronjobs

Now user-defined cron jobs can even be created easily. Simply create a folder called cron, another folder in the cron folder called 1min and in this 1min folder a file called 100-backup, commit it to your project's root directory and deploy it.

This procedure works with the following folders: 1min, 5min, 15min, 30min, hourly, daily, weekly and monthly. Files can be stored in this folders in the following scheme: 100-backup, 200-update, 300-customname, ...

Example 100-backup
#!/bin/sh

cd /data/neos && flow backup:create
SSH Access

For development you can ssh into the container:

ssh [email protected] -p <portnumber> -i ~/.ssh/yourPrivateSshKeyFile

Helpful cli scripts ### (usage: docker exec ... or kubectl exec ...)
CLI commandDescription
flowWith flow you can execute ./flow commands in every directory.
warmupWith warmup the sitemap.xml of Neos CMS is called and a frontend warmup is executed.

Tag summary

Content type

Image

Digest

sha256:d6a904558

Size

384.8 MB

Last updated

about 1 year ago

docker pull patriceckhart/docker-neos:8.4