Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

[Issue #88] Adjust docker commands based on recent updates #89

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ endif
ifeq "$(PY_RUN_APPROACH)" "local"
PY_RUN_CMD := poetry run
else
PY_RUN_CMD := docker-compose run $(DOCKER_EXEC_ARGS) --rm $(APP_NAME) poetry run
PY_RUN_CMD := docker compose run $(DOCKER_EXEC_ARGS) --rm $(APP_NAME) poetry run
endif

FLASK_CMD := $(PY_RUN_CMD) flask
Expand Down Expand Up @@ -89,24 +89,24 @@ setup-local:
##################################################

build:
docker-compose build
docker compose build

start:
docker-compose up --detach
docker compose up --detach

start-debug:
docker compose -f docker-compose.yml -f docker-compose.debug.yml up --detach

run-logs: start
docker-compose logs --follow --no-color $(APP_NAME)
docker compose logs --follow --no-color $(APP_NAME)

init: build init-db init-opensearch

clean-volumes: ## Remove project docker volumes (which includes the DB state)
docker-compose down --volumes
docker compose down --volumes

stop:
docker-compose down
docker compose down

check: format-check lint db-check-migrations test

Expand All @@ -123,7 +123,7 @@ check: format-check lint db-check-migrations test
init-db: start-db setup-postgres-db db-migrate

start-db:
docker-compose up --detach grants-db
docker compose up --detach grants-db
./bin/wait-for-local-db.sh

## Destroy current DB, setup new one
Expand Down Expand Up @@ -187,8 +187,8 @@ init-opensearch: start-opensearch
# TODO - in subsequent PRs, we'll add more to this command to setup the search index locally

start-opensearch:
docker-compose up --detach opensearch-node
docker-compose up --detach opensearch-dashboards
docker compose up --detach opensearch-node
docker compose up --detach opensearch-dashboards
./bin/wait-for-local-opensearch.sh


Expand Down
2 changes: 1 addition & 1 deletion api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ root
│ └── setup.cfg Python config for tools that don't support pyproject.toml yet
│ └── Dockerfile Docker build file for project
└── docker-compose.yml Config file for docker-compose tool, used for local development
└── docker-compose.yml Config file for docker compose tool, used for local development
```

## Local Development
Expand Down
3 changes: 0 additions & 3 deletions api/docker-compose.debug.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
version: "3.8"

# run with `docker compose -f`
# combines ports and env vars with the main docker-compose.yml main-app service

services:
grants-api:
command: [
Expand Down
3 changes: 0 additions & 3 deletions api/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
version: '3'

services:

grants-db:
image: postgres:15-alpine
container_name: grants-db
Expand Down
2 changes: 1 addition & 1 deletion api/local.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Local environment variables
# Used by docker-compose and it can be loaded
# Used by docker compose and it can be loaded
# by calling load_local_env_vars() from api/src/util/local.py

ENVIRONMENT=local
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3'

include:
- path: ./api/docker-compose.yml
- path: ./frontend/docker-compose.yml
Expand Down
2 changes: 0 additions & 2 deletions frontend/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3"

services:
nextjs:
container_name: next-dev
Expand Down
Loading