* 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
This commit is contained in:
@ -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
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"
|
||||||
|
@ -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
|
||||||
@ -110,10 +111,7 @@ services:
|
|||||||
- "9300"
|
- "9300"
|
||||||
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:
|
||||||
|
@ -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:
|
||||||
|
@ -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
vendored
Normal file
1
quick/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/_*.sh
|
1
quick/_settings.sh.example
Normal file
1
quick/_settings.sh.example
Normal file
@ -0,0 +1 @@
|
|||||||
|
PHP_VERSIONS=(74 81 82 83)
|
17
quick/pull-php-src.sh
Executable file
17
quick/pull-php-src.sh
Executable file
@ -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
Executable file
27
quick/rebuild-php.sh
Executable file
@ -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
|
Reference in New Issue
Block a user