Skip to content

Commit

Permalink
building docker image using dev-versions of galette plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
grasdk committed May 9, 2024
1 parent c75979a commit 84c9b4f
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 23 deletions.
36 changes: 31 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Building and maintaining this project is solely about the containerization of the finished Galette packages. If you want to contribute to Galette itself, take a look [here](https://galette.eu/site/contribute/).

## Updating to next Galette version
If you just want to upgrade to the next version of Galette, all you need to do is change the version number in the Dockerfile: `ARG GALETTE_VERSION=<version>`. You might also need to update the plugin versions: `ARG plugin_< plugin name>_version=<version>`. You can also provide the `GALETTE_VERSION` as a build-arg (see below).
If you just want to upgrade to the next version of Galette, all you need to do is change the version number in the Dockerfile: `ARG GALETTE_VERSION=<version>`. You might also need to update the plugin versions: `ARG PLUGIN_<plugin name>_VERSION=<version>`.

You can also provide these arguments as a build-args (see [Building the docker image with another version of PHP and/or Galette](#building-the-docker-image-with-another-version-of-php-andor-galette)).

After this, you _should_ of course build and test like described in [Building and testing locally](#building-and-testing-locally). But you can also commit the change, merge it to master and start a new release in GitHub. The github action [build and publish](./.github/workflows/docker-build-and-publish.yml), will build and publish the image, when a new release is published.

Expand Down Expand Up @@ -41,12 +43,36 @@ Although it's possible to build packages without `dockerd` running, using [`buil
* `--load` loads the image into your local docker, so you can use it as a container image.

#### Building the docker image with another version of PHP and/or Galette
1. Follow the instructions above, but add any or both of these build args to the build command: `PHP_VERSION` and/or `GALETTE_VERSION`. For example:
`docker buildx build --platform linux/amd64 -t galette-local-special --build-arg PHP_VERSION=8.2 --build-arg GALETTE_VERSION=1.0.4 --load .`
Follow the instructions above, but add any or both of these build args to the build command: `PHP_VERSION` and/or `GALETTE_VERSION`. For example:

```
docker buildx build --platform linux/amd64 -t galette-local-special \
--build-arg PHP_VERSION=8.2 \
--build-arg GALETTE_VERSION=1.0.4 \
--load .
```

#### Building the docker image with Galette pre-releases
1. Follow the instructions above, but override the two build args: `MAIN_PACKAGE_URL` and `GALETTE_RELEASE`. For example:
`docker buildx build --platform linux/amd64 -t galette-local-prerelease --build-arg MAIN_PACKAGE_URL=https://galette.eu/download/dev/ --build-arg GALETTE_RELEASE=galette-1.1.0-rc1-20240508-95bbbc2ede --load .`
- Follow the instructions above, but override the two build args: `MAIN_PACKAGE_URL` and `GALETTE_RELEASE`. For example:
```
docker buildx build --platform linux/amd64 -t galette-local-prerelease \
--build-arg MAIN_PACKAGE_URL=https://galette.eu/download/dev/ \
--build-arg GALETTE_RELEASE=galette-1.1.0-rc1-20240508-95bbbc2ede \
--load .
```
- If you want to add nightly official plugin releases, follow the instructions above, but add which release you want for each plugin as builds args, e.g. So for eample:
```
docker buildx build --platform linux/amd64 -t galette-local-prerelease \
--build-arg MAIN_PACKAGE_URL=https://galette.eu/download/dev/ \
--build-arg GALETTE_RELEASE=galette-1.1.0-rc1-20240508-95bbbc2ede \
--build-arg PLUGIN_AUTO_VERSION=dev \
--build-arg PLUGIN_EVENTS_VERSION=dev \
--build-arg PLUGIN_FULLCARD_VERSION=dev \
--build-arg PLUGIN_MAPS_VERSION=dev \
--build-arg PLUGIN_OBJECTSLEND_VERSION=dev \
--build-arg PLUGIN_PAYPAL_VERSION=dev \
--load .
```
### Building for multiple architecures locally
1. Start the docker daemon if it's not already started: `sudo dockerd`
Expand Down
36 changes: 18 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ LABEL maintainer="GrasDK"


## Plugins versions
ARG plugin_auto_version="2.0.0"
ARG plugin_events_version="2.0.0"
ARG plugin_fullcard_version="2.0.0"
ARG plugin_maps_version="2.0.0"
ARG plugin_objectslend_version="2.0.0"
ARG plugin_paypal_version="2.0.0"
ARG PLUGIN_AUTO_VERSION="2.0.0"
ARG PLUGIN_EVENTS_VERSION="2.0.0"
ARG PLUGIN_FULLCARD_VERSION="2.0.0"
ARG PLUGIN_MAPS_VERSION="2.0.0"
ARG PLUGIN_OBJECTSLEND_VERSION="2.0.0"
ARG PLUGIN_PAYPAL_VERSION="2.0.0"

LABEL description="PHP $PHP_VERSION / Apache 2 / $GALETTE_RELEASE"

Expand Down Expand Up @@ -87,28 +87,28 @@ RUN tar jxvf ${GALETTE_RELEASE}.tar.bz2; mv ${GALETTE_RELEASE}/galette/* ${GALET
## Official plugins
WORKDIR ${GALETTE_INSTALL}/plugins
### Auto
RUN wget --progress=dot:giga ${PLUGIN_PACKAGE_URL}galette-plugin-auto-${plugin_auto_version}.tar.bz2
RUN tar jxvf galette-plugin-auto-${plugin_auto_version}.tar.bz2; rm galette-plugin-auto-${plugin_auto_version}.tar.bz2; mv galette-plugin-auto-${plugin_auto_version} plugin-auto
RUN wget --progress=dot:giga ${PLUGIN_PACKAGE_URL}galette-plugin-auto-${PLUGIN_AUTO_VERSION}.tar.bz2
RUN tar jxvf galette-plugin-auto-${PLUGIN_AUTO_VERSION}.tar.bz2; rm galette-plugin-auto-${PLUGIN_AUTO_VERSION}.tar.bz2; mv galette-plugin-auto-${PLUGIN_AUTO_VERSION} plugin-auto

### Events
RUN wget --progress=dot:giga ${PLUGIN_PACKAGE_URL}galette-plugin-events-${plugin_events_version}.tar.bz2
RUN tar jxvf galette-plugin-events-${plugin_events_version}.tar.bz2; rm galette-plugin-events-${plugin_events_version}.tar.bz2; mv galette-plugin-events-${plugin_events_version} plugin-events
RUN wget --progress=dot:giga ${PLUGIN_PACKAGE_URL}galette-plugin-events-${PLUGIN_EVENTS_VERSION}.tar.bz2
RUN tar jxvf galette-plugin-events-${PLUGIN_EVENTS_VERSION}.tar.bz2; rm galette-plugin-events-${PLUGIN_EVENTS_VERSION}.tar.bz2; mv galette-plugin-events-${PLUGIN_EVENTS_VERSION} plugin-events

### FullCard
RUN wget --progress=dot:giga ${PLUGIN_PACKAGE_URL}galette-plugin-fullcard-${plugin_fullcard_version}.tar.bz2
RUN tar jxvf galette-plugin-fullcard-${plugin_fullcard_version}.tar.bz2; rm galette-plugin-fullcard-${plugin_fullcard_version}.tar.bz2; mv galette-plugin-fullcard-${plugin_fullcard_version} plugin-fullcard
RUN wget --progress=dot:giga ${PLUGIN_PACKAGE_URL}galette-plugin-fullcard-${PLUGIN_FULLCARD_VERSION}.tar.bz2
RUN tar jxvf galette-plugin-fullcard-${PLUGIN_FULLCARD_VERSION}.tar.bz2; rm galette-plugin-fullcard-${PLUGIN_FULLCARD_VERSION}.tar.bz2; mv galette-plugin-fullcard-${PLUGIN_FULLCARD_VERSION} plugin-fullcard

### Maps
RUN wget --progress=dot:giga ${PLUGIN_PACKAGE_URL}galette-plugin-maps-${plugin_maps_version}.tar.bz2
RUN tar jxvf galette-plugin-maps-${plugin_maps_version}.tar.bz2; rm galette-plugin-maps-${plugin_maps_version}.tar.bz2; mv galette-plugin-maps-${plugin_maps_version} plugin-maps
RUN wget --progress=dot:giga ${PLUGIN_PACKAGE_URL}galette-plugin-maps-${PLUGIN_MAPS_VERSION}.tar.bz2
RUN tar jxvf galette-plugin-maps-${PLUGIN_MAPS_VERSION}.tar.bz2; rm galette-plugin-maps-${PLUGIN_MAPS_VERSION}.tar.bz2; mv galette-plugin-maps-${PLUGIN_MAPS_VERSION} plugin-maps

### ObjectsLend
RUN wget --progress=dot:giga ${PLUGIN_PACKAGE_URL}galette-plugin-objectslend-${plugin_objectslend_version}.tar.bz2
RUN tar jxvf galette-plugin-objectslend-${plugin_objectslend_version}.tar.bz2; rm galette-plugin-objectslend-${plugin_objectslend_version}.tar.bz2; mv galette-plugin-objectslend-${plugin_objectslend_version} plugin-objectslend
RUN wget --progress=dot:giga ${PLUGIN_PACKAGE_URL}galette-plugin-objectslend-${PLUGIN_OBJECTSLEND_VERSION}.tar.bz2
RUN tar jxvf galette-plugin-objectslend-${PLUGIN_OBJECTSLEND_VERSION}.tar.bz2; rm galette-plugin-objectslend-${PLUGIN_OBJECTSLEND_VERSION}.tar.bz2; mv galette-plugin-objectslend-${PLUGIN_OBJECTSLEND_VERSION} plugin-objectslend

### Paypal
RUN wget --progress=dot:giga ${PLUGIN_PACKAGE_URL}galette-plugin-paypal-${plugin_paypal_version}.tar.bz2
RUN tar jxvf galette-plugin-paypal-${plugin_paypal_version}.tar.bz2; rm galette-plugin-paypal-${plugin_paypal_version}.tar.bz2; mv galette-plugin-paypal-${plugin_paypal_version} plugin-paypal
RUN wget --progress=dot:giga ${PLUGIN_PACKAGE_URL}galette-plugin-paypal-${PLUGIN_PAYPAL_VERSION}.tar.bz2
RUN tar jxvf galette-plugin-paypal-${PLUGIN_PAYPAL_VERSION}.tar.bz2; rm galette-plugin-paypal-${PLUGIN_PAYPAL_VERSION}.tar.bz2; mv galette-plugin-paypal-${PLUGIN_PAYPAL_VERSION} plugin-paypal

# CRON Auto-Reminder
## Copy galette-cron file to the cron.d directory
Expand Down

0 comments on commit 84c9b4f

Please sign in to comment.