Browse Source

* use dc alias from host system shell for execute docker compopse helper commands (and depended by os docker composer or docker-compose command style)

* extend quick helper script with settings and dynamic php version variable
* link redis-local config as volume & correct include path
* minio access keys moved to conrecte service instance
* corrected used php version for workspace81
master
WP Studio 1 week ago
parent
commit
1ea5e96fcb
  1. 2
      config/redis/redis.conf
  2. 5
      dc-nprm
  3. 4
      docker-compose.base.yml
  4. 3
      docker-compose.minio.yml.example
  5. 4
      dockerfiles/workspace/workspace81.Dockerfile
  6. 1
      quick/.gitignore
  7. 1
      quick/_settings.sh.example
  8. 17
      quick/pull-php-src.sh
  9. 27
      quick/rebuild-php.sh

2
config/redis/redis.conf

@ -44,4 +44,4 @@ client-output-buffer-limit pubsub 32mb 8mb 60
hz 10 hz 10
aof-rewrite-incremental-fsync yes aof-rewrite-incremental-fsync yes
include /etc/redis/redis-local.conf
include /usr/local/etc/redis/redis-local.conf

5
dc-nprm

@ -1,3 +1,6 @@
#!/bin/bash #!/bin/bash
# N - nginx; P - php; R - redis; M - mariadb # 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"

4
docker-compose.base.yml

@ -94,6 +94,7 @@ services:
command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ] command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
volumes: volumes:
- ./config/redis/redis.conf:/usr/local/etc/redis/redis.conf - ./config/redis/redis.conf:/usr/local/etc/redis/redis.conf
- ./config/redis/redis-local.conf:/usr/local/etc/redis/redis-local.conf
elastic: elastic:
build: build:
context: ./dockerfiles/elastic context: ./dockerfiles/elastic
@ -111,9 +112,6 @@ services:
minio: minio:
image: minio/minio:RELEASE.2020-06-12T00-06-19Z image: minio/minio:RELEASE.2020-06-12T00-06-19Z
restart: always restart: always
environment:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
command: server /minio command: server /minio
pm2: pm2:
build: build:

3
docker-compose.minio.yml.example

@ -5,6 +5,9 @@ services:
service: minio service: minio
volumes: volumes:
- minio:/minio - minio:/minio
environment:
MINIO_ACCESS_KEY:
MINIO_SECRET_KEY:
volumes: volumes:
minio: minio:

4
dockerfiles/workspace/workspace81.Dockerfile

@ -1,7 +1,7 @@
# syntax = edrevo/dockerfile-plus # 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} ENV PHP_VERSION ${PHP_VERSION}
INCLUDE+ ./workspace.base.Dockerfile INCLUDE+ ./workspace.base.Dockerfile

1
quick/.gitignore

@ -0,0 +1 @@
/_*.sh

1
quick/_settings.sh.example

@ -0,0 +1 @@
PHP_VERSIONS=(74 81 82 83)

17
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

27
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
Loading…
Cancel
Save