diff --git a/.env b/.env.template similarity index 62% rename from .env rename to .env.template index e40298b..0bcbd8f 100644 --- a/.env +++ b/.env.template @@ -1,3 +1,28 @@ +### +# Image build arguments +### + +# php-xd +PHP_XD_PHP_VERSION=8.1 +PHP_XD_ALPINE_VERSION="" +PHP_XD_TYPE="" + +# WordPress +WP_VERSION=6.5.3 +WP_PHP_VERSION=7.4 + +# PrestaShop +PS_VERSION=8.1.0 +PS_PHP_VERSION=8.1 + +# Shopware +SW_VERSION=6.5.0.0 +SW_PHP_VERSION=8.1 + +### +# Docker variables +### + DOCKER_CACHE_TYPE=local DOCKER_CACHE_SOURCE=src=.docker/cache,tag= DOCKER_CACHE_TARGET=dest=.docker/cache,tag= diff --git a/.gitignore b/.gitignore index c41d6af..acbde38 100644 --- a/.gitignore +++ b/.gitignore @@ -133,3 +133,4 @@ $RECYCLE.BIN/ # End of https://www.toptal.com/developers/gitignore/api/yarn node_modules/ +.env diff --git a/README.md b/README.md index 18d784f..40e2e79 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,22 @@ Docker images we use in our open source projects. All images have `linux/amd64` and `linux/arm64` variants. +## Usage + +To build the images using the provided root `docker-compose.yml`, first create `.env`: + +```bash +cp .env.example .env +``` + +You can change the variables in the `.env` file to change which versions of the images are built. + +After that, use Docker compose to build the images: + +```bash +docker compose build +``` + ## Contents ## php-xd diff --git a/docker-compose.yml b/docker-compose.yml index 58c1bef..b1f0e82 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,20 +1,33 @@ services: - ### - # Main php container - # - # This container runs the php-fpm process and serves WordPress. - # - # Requires the db container to be running. - # - # Contains: - # - php-fpm, xdebug, composer - # - WordPress installation (in volume web-data) - # - Various tools: zsh, vim - # - # See https://github.com/myparcelnl/docker-images/pkgs/container/wordpress - ## + php-xd: + image: ghcr.io/myparcelnl/php-xd:${PHP_XD_PHP_VERSION}${PHP_XD_TYPE}-alpine${PHP_XD_ALPINE_VERSION} + build: + context: images/php-xd + args: + ALPINE_VERSION: ${PHP_XD_ALPINE_VERSION} + PHP_VERSION: ${PHP_XD_PHP_VERSION} + TYPE: ${PHP_XD_TYPE} + wordpress: - image: ghcr.io/myparcelnl/wordpress:6.3-php7.4 + image: ghcr.io/myparcelnl/wordpress:${WP_VERSION}-php${WP_PHP_VERSION} build: context: images/wordpress - dockerfile: Dockerfile + args: + WP_VERSION: ${WP_VERSION} + PHP_VERSION: ${WP_PHP_VERSION} + + prestashop: + image: ghcr.io/myparcelnl/prestashop:${PS_VERSION}-php${PS_PHP_VERSION} + build: + context: images/prestashop + args: + PS_VERSION: ${PS_VERSION} + PHP_VERSION: ${PS_PHP_VERSION} + + shopware: + image: ghcr.io/myparcelnl/shopware:${SW_VERSION}-php${SW_PHP_VERSION} + build: + context: images/shopware + args: + SW_VERSION: ${SW_VERSION} + PHP_VERSION: ${SW_PHP_VERSION}