From de371c4264ae955326e2735a7c3d137fe55a9bf4 Mon Sep 17 00:00:00 2001 From: Alejandro Roiz Walss <26120069+alejandroroiz@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:50:26 -0600 Subject: [PATCH] migrate to docker compose v2 (#429) [docs](https://docs.docker.com/compose/migrate/#what-are-the-differences-between-compose-v1-and-compose-v2) on how to migrate why this is needed: https://github.com/actions/runner-images/issues/9692 --- CHANGELOG.md | 4 ++++ Dockerfile | 4 ++-- Makefile | 12 ++++++------ VERSION | 2 +- config/development/confidant.env | 1 - docs/root/contributing.md | 10 +++++----- pytest.ini | 1 - salt/pillar/example.sls | 1 - 8 files changed, 18 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a774729..07db54bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 6.5.8 + +* Migrated to docker compose v2 + ## 6.4.0 * Updated client with a new logo and updated CSS to match design style guide. The new CSS coloring should diff --git a/Dockerfile b/Dockerfile index b8648f26..6162a8b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /srv/confidant RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ curl ca-certificates \ - && /usr/bin/curl -sL --fail https://deb.nodesource.com/setup_8.x | bash - + && /usr/bin/curl -sL --fail https://deb.nodesource.com/setup_10.x | bash - RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ # For frontend @@ -33,7 +33,7 @@ RUN virtualenv /venv --python=/usr/bin/python3.8 && \ COPY .jshintrc Gruntfile.js /srv/confidant/ COPY confidant/public /srv/confidant/confidant/public -RUN node_modules/grunt-cli/bin/grunt build +RUN node_modules/grunt-cli/bin/grunt build --force COPY . /srv/confidant diff --git a/Makefile b/Makefile index 4e1adbcf..ba6c8d78 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,10 @@ clean: find . -name "*.pyc" -delete up: - docker-compose up + docker compose up down: - docker-compose down + docker compose down docker_build: clean docker build -t lyft/confidant . @@ -16,16 +16,16 @@ docker_build: clean docker_test: docker_build docker_test_unit docker_test_integration docker_test_frontend down docker_test_unit: - docker-compose run --rm --no-deps confidant make test_unit + docker compose run --rm --no-deps confidant make test_unit docker_test_integration: - docker-compose run --rm confidant make test_integration + docker compose run --rm confidant make test_integration actions_test_integration: - docker-compose -f docker-compose.yml -f docker-compose.integration.yml run confidant bash /srv/confidant/actions_run_integration.sh + docker compose -f docker-compose.yml -f docker-compose.integration.yml run confidant bash /srv/confidant/actions_run_integration.sh docker_test_frontend: - docker-compose run --rm confidant make test_frontend + docker compose run --rm confidant make test_frontend test: test_unit test_integration test_frontend diff --git a/VERSION b/VERSION index 54c95af1..349c8914 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.5.7 +6.5.8 diff --git a/config/development/confidant.env b/config/development/confidant.env index 5585d7e2..56d6a843 100644 --- a/config/development/confidant.env +++ b/config/development/confidant.env @@ -1,7 +1,6 @@ AWS_ACCESS_KEY_ID=1 AWS_SECRET_ACCESS_KEY=1 AWS_DEFAULT_REGION=us-east-1 -GEVENT_RESOLVER=ares DEBUG=true HOST=0.0.0.0 PORT=80 diff --git a/docs/root/contributing.md b/docs/root/contributing.md index 3ee7b650..1e0acf49 100644 --- a/docs/root/contributing.md +++ b/docs/root/contributing.md @@ -29,11 +29,11 @@ Our only method of accepting code changes is through github pull requests. ## Development guide This guide assumes you're using docker desktop, which includes docker, and -docker-compose. +docker compose. A full developer configuration is available, using compose, which uses local dynamodb, local kms, and a local simplesamplephp. We have quick make -aliases, so it's not necessary to learn the details of docker-compose. +aliases, so it's not necessary to learn the details of docker compose. ### Starting confidant @@ -41,7 +41,7 @@ To start: `make up` To test code changes: -1. Kill docker-compose (ctrl-c) +1. Kill docker compose (ctrl-c) 1. `make docker_build` 1. `make up` @@ -50,11 +50,11 @@ and the password is `confidant`. All configuration settings for this environment are in the `config/development` directory. If you wish to change any settings, kill the docker compose, make the -change, and start the docker-compose environment back up. +change, and start the docker compose environment back up. ### Running tests -The easiest way to run the tests is through docker-compose as well, as both unit +The easiest way to run the tests is through docker compose as well, as both unit and integration test suites can be run via compose. To run the full test suite (minus pre-commit): diff --git a/pytest.ini b/pytest.ini index b710824b..cfc64096 100644 --- a/pytest.ini +++ b/pytest.ini @@ -7,7 +7,6 @@ env = DYNAMODB_TABLE=confidant-testing DYNAMODB_TABLE_ARCHIVE=confidant-testing-archive DYNAMODB_URL=http://dynamodb:8080 - GEVENT_RESOLVER=ares AWS_DEFAULT_REGION=us-east-1 USER_AUTH_KEY=authnz-usertesting AUTH_KEY=authnz-testing diff --git a/salt/pillar/example.sls b/salt/pillar/example.sls index 8179ad0e..92d69729 100644 --- a/salt/pillar/example.sls +++ b/salt/pillar/example.sls @@ -5,7 +5,6 @@ confidant_env: AUTH_KEY: 'authnz-{{ grains.cluster_name }}' AUTHOMATIC_SALT: 'H39bfLCqLbrYrFyiJIxkK0uf12rlzvgjgo9FqOnttPXIdAAuyQ' DYNAMODB_TABLE: '{{ grains.cluster_name }}' - GEVENT_RESOLVER: 'ares' GOOGLE_OAUTH_CLIENT_ID: '123456789-abcdefghijklmnop.apps.googleusercontent.com' GOOGLE_OAUTH_CONSUMER_SECRET: '123456789abcdefghijklmnop' KMS_MASTER_KEY: '{{ grains.cluster_name }}'