Skip to content

Commit

Permalink
migrate to docker compose v2 (#429)
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandroroiz authored Aug 6, 2024
1 parent 88b6a12 commit de371c4
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ 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 .

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

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.5.7
6.5.8
1 change: 0 additions & 1 deletion config/development/confidant.env
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 5 additions & 5 deletions docs/root/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ 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

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`

Expand All @@ -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):
Expand Down
1 change: 0 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion salt/pillar/example.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand Down

0 comments on commit de371c4

Please sign in to comment.