Skip to content

Commit

Permalink
DPO3DPKRT-837/docker compose v2 migration (#611)
Browse files Browse the repository at this point in the history
(fix) migrated scripts and configurations of Docker Compose to v2
(fix) more strict typescript build options
(fix) unused variable fix for the sort table
  • Loading branch information
EMaslowskiQ authored Aug 9, 2024
1 parent bdc6330 commit 07ce8ad
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion client/src/pages/Admin/components/AdminToolsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ const SelectScenesTable = <T extends DBReference>({ onUpdateSelection, data, col
// Map the sorted indices back to the original elements
return indices.map(index => array[index]);
}
const createSortHandler = (property: string) => (event: React.MouseEvent<unknown>) => {
const createSortHandler = (property: string) => (_event: React.MouseEvent<unknown>) => {
const isAsc = orderBy === property && order === 'asc';
setOrder(isAsc ? 'desc' : 'asc');
setOrderBy(property);
Expand Down
2 changes: 1 addition & 1 deletion conf/scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ export ENV=$ENV
echo "Deploying docker images for env $ENV with tag: $IMAGE_TAG"

# Build packrat-server and client dynamically for environment's requested
docker-compose --env-file .env.$ENV -f ./conf/docker/docker-compose.deploy.yml up --build -d packrat-server-$ENV packrat-client-$ENV packrat-solr-$ENV
docker compose --env-file .env.$ENV -f ./conf/docker/docker-compose.deploy.yml up --build -d packrat-server-$ENV packrat-client-$ENV packrat-solr-$ENV
2 changes: 1 addition & 1 deletion conf/scripts/initdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export ENV=$ENV
echo "Starting docker DB image for env $1 with tag: $IMAGE_TAG"

# Start the databases
docker-compose --env-file .env.$1 -f ./conf/docker/docker-compose.deploy.yml up -d packrat-db-$1
docker compose --env-file .env.$1 -f ./conf/docker/docker-compose.deploy.yml up -d packrat-db-$1

# DB init scripts
docker exec -i packrat-db-$1 sh -c "mysql -u root -p$MYSQL_ROOT_PASSWORD -e 'CREATE DATABASE IF NOT EXISTS Packrat'"
Expand Down
2 changes: 1 addition & 1 deletion conf/scripts/reload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ export ENV=$ENV
echo "Reloading docker images for env $1 with tag: $IMAGE_TAG"

# Build packrat-server and client dynamically for environment's requested
docker-compose --env-file .env.$1 -f ./conf/docker/docker-compose.deploy.yml up -d packrat-server-$1 packrat-client-$1 packrat-solr-$1
docker compose --env-file .env.$1 -f ./conf/docker/docker-compose.deploy.yml up -d packrat-server-$1 packrat-client-$1 packrat-solr-$1
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@
"devbox:network": "./conf/scripts/devbox/network.sh",
"devbox:start": "docker exec -it packrat-devbox bash",
"devbox:down": "docker container rm packrat-devbox --force",
"dev": "docker-compose --env-file .env.dev -p dpo-packrat -f ./conf/docker/docker-compose.dev.yml up -d",
"dev:solr": "docker-compose --env-file .env.dev -p dpo-packrat -f ./conf/docker/docker-compose.dev.yml up -d packrat-solr",
"dev:proxy": "docker-compose --env-file .env.dev -p dpo-packrat -f ./conf/docker/docker-compose.dev.yml up -d packrat-proxy",
"dev:db": "docker-compose --env-file .env.dev -p dpo-packrat -f ./conf/docker/docker-compose.dev.yml up -d db",
"dev:server": "docker-compose --env-file .env.dev -p dpo-packrat -f ./conf/docker/docker-compose.dev.yml up -d packrat-server",
"dev:client": "docker-compose --env-file .env.dev -p dpo-packrat -f ./conf/docker/docker-compose.dev.yml up -d packrat-client",
"prod": "docker-compose --env-file .env.prod -p dpo-packrat -f ./conf/docker/docker-compose.prod.yml up -d",
"dev": "docker compose --env-file .env.dev -p dpo-packrat -f ./conf/docker/docker-compose.dev.yml up -d",
"dev:solr": "docker compose --env-file .env.dev -p dpo-packrat -f ./conf/docker/docker-compose.dev.yml up -d packrat-solr",
"dev:proxy": "docker compose --env-file .env.dev -p dpo-packrat -f ./conf/docker/docker-compose.dev.yml up -d packrat-proxy",
"dev:db": "docker compose --env-file .env.dev -p dpo-packrat -f ./conf/docker/docker-compose.dev.yml up -d db",
"dev:server": "docker compose --env-file .env.dev -p dpo-packrat -f ./conf/docker/docker-compose.dev.yml up -d packrat-server",
"dev:client": "docker compose --env-file .env.dev -p dpo-packrat -f ./conf/docker/docker-compose.dev.yml up -d packrat-client",
"prod": "docker compose --env-file .env.prod -p dpo-packrat -f ./conf/docker/docker-compose.prod.yml up -d",
"deploy:dev": "sh ./conf/scripts/deploy.sh dev",
"deploy:prod": "sh ./conf/scripts/deploy.sh prod",
"build:dev": "lerna run build:dev",
"build:prod": "lerna run build:prod",
"clean": "lerna run clean && rm -rf node_modules/ && rm -rf docs/public && rm -rf docs/resources/_gen && rm -f docs/.hugo_build.lock",
"clean:docker": "docker-compose -f ./conf/docker/docker-compose.dev.yml down && docker system prune -f",
"clean:docker": "docker compose -f ./conf/docker/docker-compose.dev.yml down && docker system prune -f",
"generate:server:prisma": "yarn workspace @dpo-packrat/server generate:prisma",
"postinstall": "lerna run postinstall && yarn install:e2e",
"install:e2e": "cd e2e && yarn install --frozen-lockfile && cd ..",
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"strictFunctionTypes": true,
"noImplicitThis": true,
"alwaysStrict": true,
// "noUnusedLocals": true,
// "noUnusedParameters": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"esModuleInterop": true
Expand Down

0 comments on commit 07ce8ad

Please sign in to comment.