Current repository hosts sources of the Galette docker image, created and maintained by Galette Community.
If you want to contribute to containerized galette, take a look here.
- integrated plugins : events, fullcard, maps, objectslend and paypal
- mount volume to keep persistent database settings (config.inc.php)
- keep data (images, logs, etc) persistent by mounting volumes
- enabling Log IP addresses behind a proxy (optional)
- customize your CSS (volume)
- user www-data instead of root
- a crontab will run
reminder.php
(with user www-data) every day at 8:30am to send reminder mail - only webroot is exposed via Apache DocumentRoot and vhost
- you can use reverse proxy to access Galette by domain or subdomain
This docker image has no included database, so you need to have that separately. Since you probably already are running docker, take a look here for a guide on how to run MariaDB in a container.
Galette has a really nice installer, that runs you through database setup and initial admin user creation. The installer creates a configuration files, which you will be interested in keeping on a volume outside the docker image, for reuse when you upgrade to a newer version.
Therefore it is really important that you follow this guide exactly.
If you are upgrading from an earlier version, you can skip the first two steps below.
-
Create an empty file
config.inc.php
which you will mount as a volume in the next step.- It is important that you create this file. You can also take a copy of this, as the contents do not matter
-
Start a container with the version of galette you want (perhaps :latest) and the proper list of volumes, take note of the
config.inc.php
volume which is a file.docker run -d -p 8080:80 --name galette -v /path/to/config.inc.php:/var/www/galette/config/config.inc.php \ -v /path/to/data/attachments:/var/www/galette/data/attachments \ -v /path/to/data/cache:/var/www/galette/data/cache \ -v /path/to/data/files:/var/www/galette/data/files \ -v /path/to/data/logs:/var/www/galette/data/logs \ -v /path/to/data/photos:/var/www/galette/data/photos \ -v ./path/to/data/templates_c:/var/www/galette/data/templates_c \ galette/galette:latest
Remember to replace
./path/to/
with your own path. -
Run the installer: Open a browser to http://<ip or server name>:8080/installer.php, e.g. http://localhost:8080/installer.php and follow the instructions.
- Remember your database details, as you will need them in this process.
You're done!
N.B.: You can check
config.inc.php
in container.docker exec galette cat /var/www/galette/config/config.inc.php
-
As a subsequent security precaution, you should delete the galette installation files. Replace
galette
with the actual container name, if you changed that in the commands above.docker exec galette rm -r /var/www/galette/install
-
Advanced configuration:
Add the following volume to your container parameters to control logging of IP addresses behind a proxy, or to enable debugging mode. Read here for more info:
-v ./path/to/config/behavior.inc.php:/var/www/galette/config/behavior.inc.php
Add the folloing volume to your container parameters to enable custom styling via CSS. Read here for more info:
v ./path/to/galette_local.css:/var/www/galette/webroot/themes/default/galette_local.css
Remember to replace
./path/to/
with your own path.
From the main page of galette, click the plugin icon and manage the built-in modules. You can disable/enable them an initialize their database configuration from the UI.
- Copy
docker-compose/galette/docker-compose.yml
anddocker-compose/galette/.env
to the folder, where you want to persist your configuration. - Optionally edit the values in
.env
- Create a
config
folder and an emptyconfig.inc.php
in that folder. Or copy the one from here. - Launch with
docker-compose up -d
- Go to http://localhost:8080/installer.php and complete installation (database, etc).
- Note that http://localhost:8080 will report a failure, but adding /installer will work.
You're done.
- See above for deleting the install folder, advanced configuration and plugin configuration! In the docker compose example file, there are commented out lines for the behavior or css volumes.
- Copy
docker-compose/galette-and-mariadb/docker-compose.yml
anddocker-compose/galette-and-mariadb/.env
to the folder, where you want to persist your configuration. - Edit the
env
file to set your database configuration. Don't skip this. - Continue with the rest of the steps above
- MariaDB takes some time to start, so have patience.
- MariaDB and Galette will be running in two different containers. The MariaDB exposes its standard port 3306 according to the compose-configuration, so you can connect using the IP or hostname of the docker host, when you enter the database details in the galette installer.
An example of reverse proxy configuration for Nginx is provided.