diff --git a/config/redis/redis.conf b/config/redis/redis.conf index 498d201..7cca4b3 100644 --- a/config/redis/redis.conf +++ b/config/redis/redis.conf @@ -44,4 +44,4 @@ client-output-buffer-limit pubsub 32mb 8mb 60 hz 10 aof-rewrite-incremental-fsync yes -include /etc/redis/redis-local.conf +include /usr/local/etc/redis/redis-local.conf diff --git a/dc-nprm b/dc-nprm index c2aa1d1..b3223f3 100755 --- a/dc-nprm +++ b/dc-nprm @@ -1,3 +1,6 @@ #!/bin/bash # N - nginx; P - php; R - redis; M - mariadb -dc -f docker-compose.yml -f docker-compose.redis.yml -f docker-compose.mariadb.yml $@ + +ARGS=$@ + +bash -ic "dc -f docker-compose.yml -f docker-compose.redis.yml -f docker-compose.mariadb.yml $ARGS" diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 3ff9d5b..0fe216c 100755 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -94,6 +94,7 @@ services: command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ] volumes: - ./config/redis/redis.conf:/usr/local/etc/redis/redis.conf + - ./config/redis/redis-local.conf:/usr/local/etc/redis/redis-local.conf elastic: build: context: ./dockerfiles/elastic @@ -110,10 +111,7 @@ services: - "9300" minio: image: minio/minio:RELEASE.2020-06-12T00-06-19Z - restart: always - environment: - MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY} - MINIO_SECRET_KEY: ${MINIO_SECRET_KEY} + restart: always command: server /minio pm2: build: diff --git a/docker-compose.minio.yml.example b/docker-compose.minio.yml.example index 2d1ebc1..be3b9ab 100755 --- a/docker-compose.minio.yml.example +++ b/docker-compose.minio.yml.example @@ -5,6 +5,9 @@ services: service: minio volumes: - minio:/minio + environment: + MINIO_ACCESS_KEY: + MINIO_SECRET_KEY: volumes: minio: diff --git a/dockerfiles/workspace/workspace81.Dockerfile b/dockerfiles/workspace/workspace81.Dockerfile index 9c14249..49fe210 100644 --- a/dockerfiles/workspace/workspace81.Dockerfile +++ b/dockerfiles/workspace/workspace81.Dockerfile @@ -1,7 +1,7 @@ # syntax = edrevo/dockerfile-plus -FROM dimti/workspace:8.2 +FROM dimti/workspace:8.1 -ARG PHP_VERSION=8.2 +ARG PHP_VERSION=8.1 ENV PHP_VERSION ${PHP_VERSION} INCLUDE+ ./workspace.base.Dockerfile diff --git a/quick/.gitignore b/quick/.gitignore new file mode 100644 index 0000000..3cd7a3a --- /dev/null +++ b/quick/.gitignore @@ -0,0 +1 @@ +/_*.sh \ No newline at end of file diff --git a/quick/_settings.sh.example b/quick/_settings.sh.example new file mode 100644 index 0000000..3b9c025 --- /dev/null +++ b/quick/_settings.sh.example @@ -0,0 +1 @@ +PHP_VERSIONS=(74 81 82 83) \ No newline at end of file diff --git a/quick/pull-php-src.sh b/quick/pull-php-src.sh new file mode 100755 index 0000000..185b785 --- /dev/null +++ b/quick/pull-php-src.sh @@ -0,0 +1,17 @@ +#!/bin/bash +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +. $SCRIPT_DIR/_settings.sh || { + echo "no settings" && exit 1 +} + +function dot_version() { + sed -r 's/^([[:digit:]])/\1./g' <<< $1 +} + +for PHP_VERSION in "${PHP_VERSIONS[@]}"; do + PHP_IMAGE=$(dot_version ${PHP_VERSION}) + + docker pull "dimti/workspace:${PHP_IMAGE}" + docker pull "dimti/php:${PHP_IMAGE}" +done \ No newline at end of file diff --git a/quick/rebuild-php.sh b/quick/rebuild-php.sh new file mode 100755 index 0000000..95f89b7 --- /dev/null +++ b/quick/rebuild-php.sh @@ -0,0 +1,27 @@ +#!/bin/bash +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +. $SCRIPT_DIR/_settings.sh || { + echo "no settings" && exit 1 +} + +cd "$SCRIPT_DIR/.." + +set -e + +for PHP_VERSION in "${PHP_VERSIONS[@]}"; do + echo + echo "Rebuilding: PHP ${PHP_VERSION}" + echo + + PHP_SERVICE="php${PHP_VERSION}" + WORKSPACE_SERVICE="workspace${PHP_VERSION}" + + bash -ic "dc build ${PHP_SERVICE}" + bash -ic "dc up -d --force-recreate ${PHP_SERVICE}" + + bash -ic "dc build ${WORKSPACE_SERVICE}" + bash -ic "dc up -d --force-recreate ${WORKSPACE_SERVICE}" + + echo +done