From ee593933a1eaf75d8b610d24649be2c2f3c8e161 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Thu, 6 Oct 2022 02:05:24 +0200 Subject: Add a pull command to update docker images to diaspora-dev script Before the images were only pulled once and then never updated which lead to really outdated images and OS dependencies. Now all images (including the base image for the diaspora container) are pulled when running `setup`. So the idea is to run the `setup` command from time to time to bring everything up to date again. --- script/diaspora-dev | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/script/diaspora-dev b/script/diaspora-dev index 1c5eace04..5bd032ea2 100755 --- a/script/diaspora-dev +++ b/script/diaspora-dev @@ -10,7 +10,8 @@ print_usage() { setup) echo; echo "Set up the environment for diaspora*" echo; echo "This command is an alias for the execution of the commands" - echo "build, config, bundle, migrate and setup-tests, in that order." + echo "build, config, pull, bundle, setup-rails and setup-tests, in that order." + echo; echo "This command can also be used to update the environment again." print_usage_header "setup [options]" \ " --force Rebuild image without using Docker's cache;" \ " overwrite existing configuration" \ @@ -80,6 +81,10 @@ print_usage() { print_usage_header "build [options]" \ " --no-cache Rebuild image without using Docker's cache" ;; + pull) + echo; echo "Pull docker images needed for the development environment" + print_usage_header "pull" + ;; bundle) echo; echo "Install gems using bundle into $DIASPORA_ROOT" print_usage_header "bundle" @@ -158,6 +163,7 @@ print_usage_full() { echo echo "Misc. Commands:" echo " build Build basic diaspora* environment" + echo " pull Update docker images" echo " bundle (Re-)Install gems for diaspora*" echo " yarn (Re-)Install frontend dependencies for diaspora*" echo " config Configure diaspora*" @@ -228,7 +234,11 @@ dia_get_db() { dia_build() { if [ $# -gt 0 ] && [ "$1" == "--no-cache" ]; then nocache="--no-cache"; fi # Build the diaspora Docker container (diaspora:dev-latest) - dia_docker_compose build $nocache diaspora + dia_docker_compose build --pull $nocache diaspora +} + +dia_pull() { + dia_docker_compose pull redis $(dia_get_db) } dia_bundle() { @@ -450,6 +460,7 @@ dia_setup() { set -e dia_build $build dia_config $config + dia_pull dia_bundle dia_setup_rails dia_setup_tests @@ -579,6 +590,9 @@ case "$dia_command" in pronto) dia_pronto ;; + pull) + dia_pull + ;; restart) dia_restart "$@" ;; -- cgit v1.2.3 From 8b74138e5a108b42072fb7fcfbeccb3b8462f714 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Thu, 6 Oct 2022 02:12:40 +0200 Subject: Update postgres and mariadb container to latest major version This is a breaking change, so dev-databases need to be recreated. --- docker/develop/docker-compose.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docker/develop/docker-compose.yml b/docker/develop/docker-compose.yml index 8b41d6ed7..46e38d2e9 100644 --- a/docker/develop/docker-compose.yml +++ b/docker/develop/docker-compose.yml @@ -23,8 +23,8 @@ services: ports: - ${DIASPORA_DOCKER_PORT:-3000}:3000 environment: - - ENVIRONMENT_REDIS=redis://redis - - SERVER_LISTEN=tcp://0.0.0.0:3000 + ENVIRONMENT_REDIS: redis://redis + SERVER_LISTEN: tcp://0.0.0.0:3000 depends_on: - "${DIASPORA_DOCKER_DB}" - redis @@ -36,14 +36,16 @@ services: - redis_data:/data postgresql: - image: postgres:10.3 + image: postgres:15 ports: - 55432:5432 volumes: - postgresql_data:/var/lib/postgresql + environment: + POSTGRES_PASSWORD: postgres mysql: - image: mariadb:10.2 + image: mariadb:10.9 ports: - 53306:3306 volumes: -- cgit v1.2.3