diff --git a/.example/docker-compose.yml b/.example/docker-compose.yml deleted file mode 100644 index 6146711..0000000 --- a/.example/docker-compose.yml +++ /dev/null @@ -1,28 +0,0 @@ -version: '3.7' - -services: - galette: - image: galette/galette:latest - container_name: galette - stdin_open: true - tty: true - environment: - - TZ=Europe/Paris # Define Timezone. Europe/Paris by default. - - RM_INSTALL_FOLDER=0 # 0 by default. Turn to "1" to remove "install" folder (for security purpose), after installation/update. - ports: - - 8080:80 - volumes: - - ./data/attachments:/var/www/galette/data/attachments - - ./data/cache:/var/www/galette/data/cache - - ./data/files:/var/www/galette/data/files - - ./data/logs:/var/www/galette/data/logs - - ./data/photos:/var/www/galette/data/photos - - ./data/tempimages:/var/www/galette/data/tempimages - - ./data/templates_c:/var/www/galette/data/templates_c - - ./config/config.inc.php:/var/www/galette/config/config.inc.php -# Uncomment this line below, to Log IP addresses behind a proxy or enabling debug mode : see file config/behavior.inc.php -# https://doc.galette.eu/en/master/usermanual/avancee.html#log-ip-addresses-behind-a-proxy -# - ./config/behavior.inc.php:/var/www/galette/config/behavior.inc.php -# Uncomment this line below, to enable a custom css -# https://doc.galette.eu/en/master/usermanual/avancee.html#adapt-to-your-graphical-chart -# - ./galette_local.css:/var/www/galette/webroot/themes/default/galette_local.css diff --git a/.github/workflows/docker-build-and-publish.yml b/.github/workflows/docker-build-and-publish.yml index 30efb21..6dea034 100644 --- a/.github/workflows/docker-build-and-publish.yml +++ b/.github/workflows/docker-build-and-publish.yml @@ -56,4 +56,5 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} repository: galette/galette readme-filepath: ./README.md - short-description: Membership management web application towards non profit organizations \ No newline at end of file + short-description: Membership management web application towards non profit organizations + enable-url-completion: true \ No newline at end of file diff --git a/README.md b/README.md index 62e4a6c..f7dfd79 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Galette has a really nice installer, that runs you through database setup and in Therefore it is really important that you follow this guide exactly. -If you are upgrading from an ealier version, you can skip the first two steps below. +If you are upgrading from an earlier version, you can skip the first two steps below. 1. 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](.example/config/config.inc.php), as the contents do not matter @@ -72,15 +72,25 @@ If you are upgrading from an ealier version, you can skip the first two steps be 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. ## How to use this image using Docker Compose -1. Copy [docker-compose.yml](.example/docker-compose.yml) to the folder, where you want to persist your configuration. -2. Create a `config` folder and an empty `config.inc.php` in that folder. Or copy the one from [here](.example/config/config.inc.php). -3. Launch with `docker-compose up -d` -4. Go to http://localhost:8080/installer.php and complete installation (database, etc) +1. Copy [`docker-compose/galette/docker-compose.yml`](docker-compose/galette/docker-compose.yml) and [`docker-compose/galette/.env`](docker-compose/galette/.env) to the folder, where you want to persist your configuration. +2. Optionally edit the values in `.env` +3. Create a `config` folder and an empty `config.inc.php` in that folder. Or copy the one from [here](.example/config/config.inc.php). +4. Launch with `docker-compose up -d` +5. 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. 5. 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. +## How to use this image AND a mariadb image using Docker Compose +1. Copy [`docker-compose/galette-and-mariadb/docker-compose.yml`](docker-compose/galette-and-mariadb/docker-compose.yml) and [`docker-compose/galette-and-mariadb/.env`](docker-compose/galette-and-mariadb/.env) to the folder, where you want to persist your configuration. +2. Edit the `env` file to set your database configuration. **Don't** skip this. +3. 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. + ## Reverse proxy ### Nginx diff --git a/docker-compose/galette-and-mariadb/.env b/docker-compose/galette-and-mariadb/.env new file mode 100644 index 0000000..5dd8782 --- /dev/null +++ b/docker-compose/galette-and-mariadb/.env @@ -0,0 +1,8 @@ +GALETTE_VERSION=1.0.4 +GALETTE_DATA_DIR=./galette +MARIADB_VERSION="10.11" +MARIADB_HOST_DATA_DIR="./mariadb" +MARIADB_ROOT_PASSWORD="mydbrootpass" +MARIADB_DATABASE="galette" +MARIADB_USER="mygaletteuser" +MARIADB_PASSWORD="mygalettepass" diff --git a/docker-compose/galette-and-mariadb/docker-compose.yml b/docker-compose/galette-and-mariadb/docker-compose.yml new file mode 100644 index 0000000..bf16868 --- /dev/null +++ b/docker-compose/galette-and-mariadb/docker-compose.yml @@ -0,0 +1,43 @@ +version: '3.7' + +services: + mariadb: + image: mariadb:${MARIADB_VERSION} + restart: always + container_name: mariadb + ports: + - 3306:3306 + volumes: + - ${MARIADB_HOST_DATA_DIR}/data/database:/var/lib/mysql + environment: + MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD} + MARIADB_DATABASE: ${MARIADB_DATABASE} + MARIADB_USER: ${MARIADB_USER} + MARIADB_PASSWORD: ${MARIADB_PASSWORD} + + galette: + image: galette/galette:${GALETTE_VERSION} + restart: always + container_name: galette-${GALETTE_VERSION} + stdin_open: true + tty: true + environment: + - TZ=Europe/Paris # Define Timezone. Europe/Paris by default. + - RM_INSTALL_FOLDER=0 # 0 by default. Turn to "1" to remove "install" folder (for security purpose), after installation/update. + ports: + - 8080:80 + volumes: + - ${GALETTE_DATA_DIR}/data/attachments:/var/www/galette/data/attachments + - ${GALETTE_DATA_DIR}/data/cache:/var/www/galette/data/cache + - ${GALETTE_DATA_DIR}/data/files:/var/www/galette/data/files + - ${GALETTE_DATA_DIR}/data/logs:/var/www/galette/data/logs + - ${GALETTE_DATA_DIR}/data/photos:/var/www/galette/data/photos + - ${GALETTE_DATA_DIR}/data/tempimages:/var/www/galette/data/tempimages + - ${GALETTE_DATA_DIR}/data/templates_c:/var/www/galette/data/templates_c + - ${GALETTE_DATA_DIR}/config/config.inc.php:/var/www/galette/config/config.inc.php +# Uncomment this line below, to Log IP addresses behind a proxy or enabling debug mode : see file config/behavior.inc.php +# https://doc.galette.eu/en/master/usermanual/avancee.html#log-ip-addresses-behind-a-proxy +# - ${DATA_DIR}/config/behavior.inc.php:/var/www/galette/config/behavior.inc.php +# Uncomment this line below, to enable a custom css +# https://doc.galette.eu/en/master/usermanual/avancee.html#adapt-to-your-graphical-chart +# - ${DATA_DIR}/galette_local.css:/var/www/galette/webroot/themes/default/galette_local.css diff --git a/docker-compose/galette/.env b/docker-compose/galette/.env new file mode 100644 index 0000000..0a42b82 --- /dev/null +++ b/docker-compose/galette/.env @@ -0,0 +1,2 @@ +GALETTE_VERSION=1.0.4 +GALETTE_DATA_DIR=./galette diff --git a/docker-compose/galette/docker-compose.yml b/docker-compose/galette/docker-compose.yml new file mode 100644 index 0000000..ad34257 --- /dev/null +++ b/docker-compose/galette/docker-compose.yml @@ -0,0 +1,29 @@ +version: '3.7' + +services: + galette: + image: galette/galette:${GALETTE_VERSION} + restart: always + container_name: galette-${GALETTE_VERSION} + stdin_open: true + tty: true + environment: + - TZ=Europe/Paris # Define Timezone. Europe/Paris by default. + - RM_INSTALL_FOLDER=0 # 0 by default. Turn to "1" to remove "install" folder (for security purpose), after installation/update. + ports: + - 8080:80 + volumes: + - ${GALETTE_DATA_DIR}/data/attachments:/var/www/galette/data/attachments + - ${GALETTE_DATA_DIR}/data/cache:/var/www/galette/data/cache + - ${GALETTE_DATA_DIR}/data/files:/var/www/galette/data/files + - ${GALETTE_DATA_DIR}/data/logs:/var/www/galette/data/logs + - ${GALETTE_DATA_DIR}/data/photos:/var/www/galette/data/photos + - ${GALETTE_DATA_DIR}/data/tempimages:/var/www/galette/data/tempimages + - ${GALETTE_DATA_DIR}/data/templates_c:/var/www/galette/data/templates_c + - ${GALETTE_DATA_DIR}/config/config.inc.php:/var/www/galette/config/config.inc.php +# Uncomment this line below, to Log IP addresses behind a proxy or enabling debug mode : see file config/behavior.inc.php +# https://doc.galette.eu/en/master/usermanual/avancee.html#log-ip-addresses-behind-a-proxy +# - ${DATA_DIR}/config/behavior.inc.php:/var/www/galette/config/behavior.inc.php +# Uncomment this line below, to enable a custom css +# https://doc.galette.eu/en/master/usermanual/avancee.html#adapt-to-your-graphical-chart +# - ${DATA_DIR}/galette_local.css:/var/www/galette/webroot/themes/default/galette_local.css \ No newline at end of file