diff --git a/Makefile b/Makefile index 7e721c8086..907e145505 100644 --- a/Makefile +++ b/Makefile @@ -106,19 +106,13 @@ run-uwsgi-async: link-development-env WEB_SERVER_TYPE=uwsgi-async poetry run ./run_app.sh dev-compose-up: - docker compose -f docker-compose-dev-mac.yml pull eq-questionnaire-launcher - docker compose -f docker-compose-dev-mac.yml pull sds - docker compose -f docker-compose-dev-mac.yml pull cir - docker compose -f docker-compose-dev-mac.yml up -d - -dev-compose-up-linux: - docker compose -f docker-compose-dev-linux.yml up -d + docker compose -f docker-compose-dev.yml pull eq-questionnaire-launcher + docker compose -f docker-compose-dev.yml pull sds + docker compose -f docker-compose-dev.yml pull cir + docker compose -f docker-compose-dev.yml up -d dev-compose-down: - docker compose -f docker-compose-dev-mac.yml down - -dev-compose-down-linux: - docker compose -f docker-compose-dev-linux.yml down + docker compose -f docker-compose-dev.yml down profile: poetry run python profile_application.py diff --git a/README.md b/README.md index 73dd4050a2..fcf50cc66c 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,21 @@ ## Run with Docker -Install Docker for your system: [https://www.docker.com/](https://www.docker.com/) +Install [Docker](https://www.docker.com/) for your system. Make sure that you've installed both docker and docker-compose packages, preferably using Homebrew: + +``` shell +brew install docker +brew install docker-compose +``` +On MacOS install container runtimes, eg. [Colima](https://github.com/abiosoft/colima): +```shell +brew install colima +``` + +Make sure Colima is started every time you want to use Docker images: +```shell +colima start +``` To get eq-questionnaire-runner running the following command will build and run the containers @@ -141,7 +155,7 @@ Runner requires five supporting services - a questionnaire launcher, a storage b #### Run supporting services with Docker -To run the app locally, but the supporting services in Docker, run: +To run the app locally, but the supporting services in Docker, make sure you have Docker and Colima installed [from this step](#run-with-docker), then run: ``` shell make dev-compose-up @@ -158,7 +172,7 @@ make dev-compose-up-linux ##### [Questionnaire launcher](https://github.com/ONSDigital/eq-questionnaire-launcher) ``` shell -docker run -e SURVEY_RUNNER_SCHEMA_URL=http://docker.for.mac.host.internal:5000 -e SDS_API_BASE_URL=http://docker.for.mac.host.internal:5003 -e CIR_API_BASE_URL=http://docker.for.mac.host.internal:5004 -it -p 8000:8000 onsdigital/eq-questionnaire-launcher:latest +docker run -e SURVEY_RUNNER_SCHEMA_URL=http://host.docker.internal:5000 -e SDS_API_BASE_URL=http://host.docker.internal:5003 -e CIR_API_BASE_URL=http://host.docker.internal:5004 -it -p 8000:8000 onsdigital/eq-questionnaire-launcher:latest ``` ##### [Mock Supplementary data service](https://github.com/ONSDigital/eq-runner-mock-sds) diff --git a/docker-compose-dev-mac.yml b/docker-compose-dev-mac.yml deleted file mode 100644 index 9312153355..0000000000 --- a/docker-compose-dev-mac.yml +++ /dev/null @@ -1,47 +0,0 @@ -services: - datastore: - image: knarz/datastore-emulator - networks: - - eq-env - ports: - - "8432:8432" - - redis: - image: redis:4 - networks: - - eq-env - ports: - - "6379:6379" - - eq-questionnaire-launcher: - image: "onsdigital/eq-questionnaire-launcher:latest" - environment: - SURVEY_RUNNER_URL: http://localhost:5000 - SURVEY_RUNNER_SCHEMA_URL: http://docker.for.mac.host.internal:5000 - SDS_API_BASE_URL: http://docker.for.mac.host.internal:5003 - CIR_API_BASE_URL: http://docker.for.mac.host.internal:5004 - networks: - - eq-env - restart: always - ports: - - "8000:8000" - - sds: - image: "onsdigital/eq-runner-mock-sds:latest" - networks: - - eq-env - restart: always - ports: - - "5003:5003" - - cir: - image: "onsdigital/eq-runner-mock-cir:latest" - networks: - - eq-env - restart: always - ports: - - "5004:5004" - -networks: - eq-env: - driver: bridge diff --git a/docker-compose-dev-linux.yml b/docker-compose-dev.yml similarity index 100% rename from docker-compose-dev-linux.yml rename to docker-compose-dev.yml