Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Installation & Hosting

Docker Image base on linuxserver/alpine

Started by JOduMonT 8 years ago · 2 replies · 1433 views
8 years ago

Hi everyone;

a Docker Image for GravCMS

I just pushed a docker image based on Alpine 3.7 built à la Linux Server way!,
which means nginx & php runs as a user in the container.

What you will get ?

You will have the last grav+admin and the nginx default configuration I found on the github of getgrav.

APCu & OPCache Status*

You could see if and how APCu and OPCache are used at : ./apc.php and ./opcache.php

<details>
<summary>click here to see the source of these files</summary>

  • APC Status comes from the github of krakjoe
  • OPCache Status comes from the github of rlerdorf

</details>

I recommend you to remove them in production,

<details>
<summary>which you could easily do by executing :</summary>

GRAVIMG=$(docker ps|grep jodumont/grav|cut -d' ' -f1)
docker exec $GRAVIMG rm /config/www/grav-admin/apc.php
docker exec $GRAVIMG rm /config/www/grav-admin/opcache.php
[spoiler]If you delete them, they won't come back.[/spoiler]

</details>

What is inside the magic box ?

<details>
<summary>Nothing fancy and it won't require a lot of maintenance and update.</summary>

The container is based on : php requirements of getGrav +

  • logrotate for nginx and php-fpm
  • apcu as cache system
  • exif if you want to use the auto metadata option
  • opcache because php cache is never enough
  • tidy in case you want to minify css and js
  • yaml to increase dramatically the performance

The nginx default config also come from github getgrav.
and point to /config/www/grav-admin

The 1st run

GravCMS will be installed in /config/www/grav-admin
./apc.php and ./opcache.php will be pulled from github.

</details>

Source

is on my github

So enjoy and don't hesitate to give me feedback or ask question
I'm sure we could make it better.

and o!... I forget;
have a great day!

Jonathan

👍 1
last edited 02/16/18 by JOduMonT
8 years ago

Thanks! Will check it out when i get a mo!

8 years ago

it's now turning on Alpine edge
with few modification

Suggested topics

Topic Participants Replies Views Activity
Installation & Hosting · by antoinep, 15 hours ago
5 61 9 hours ago
Installation & Hosting · by Jürgen Dietrich, 7 months ago
0 63 7 months ago
Installation & Hosting · by rappluk, 8 months ago
0 62 8 months ago
Installation & Hosting · by N, 12 months ago
3 73 12 months ago
Installation & Hosting · by Youle, 1 year ago
1 62 1 year ago