diff --git a/Makefile b/Makefile index ec18d497ab..b247be97fd 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ SCHEMACHECK ?= docker run --rm -i hiogawa/schemacheck # https://github.com/hi-og lint: lint/docker-compose lint/shellcheck lint/github-workflow lint/docker-compose: - docker-compose config -q + docker compose config -q lint/shellcheck: $(SHELLCHECK) scripts/*.sh $$(find misc -name '*.sh') @@ -40,20 +40,20 @@ db/seed-download: wget --retry-on-http-error=403,503 -c -P misc/fixture https://github.com/hi-ogawa/ytsub-v3/files/11279701/fetchCaptionEntries-EnPYXckiUVg-fr-en.txt db/dump: - docker-compose exec -T mysql mysqldump -uroot -ppassword ytsub_development | gzip -c > "misc/db/dump/$$(date '+%Y_%m_%d_%H_%M_%S').sql.gz" + docker compose exec -T mysql mysqldump -uroot -ppassword ytsub_development | gzip -c > "misc/db/dump/$$(date '+%Y_%m_%d_%H_%M_%S').sql.gz" db/restore: - gunzip -c $$(ls misc/db/dump/*.sql.gz | tail -n 1) | docker-compose exec -T mysql mysql -uroot -ppassword ytsub_development + gunzip -c $$(ls misc/db/dump/*.sql.gz | tail -n 1) | docker compose exec -T mysql mysql -uroot -ppassword ytsub_development db/restore/dev: - gunzip -c misc/db/dev.sql.gz | docker-compose exec -T mysql mysql -uroot -ppassword ytsub_development + gunzip -c misc/db/dev.sql.gz | docker compose exec -T mysql mysql -uroot -ppassword ytsub_development db/dump/production: pscale org switch hiro18181-ytsub pscale database dump ytsub_production main --output misc/db/dump-pscale/$$(date '+%Y_%m_%d_%H_%M_%S') db/restore/production: - ls $$(find misc/db/dump-pscale -mindepth 1 -type d | sort | tail -n 1)/*.sql | sort | xargs cat | docker-compose exec -T mysql mysql -uroot -ppassword --default-character-set=utf8mb4 ytsub_development + ls $$(find misc/db/dump-pscale -mindepth 1 -type d | sort | tail -n 1)/*.sql | sort | xargs cat | docker compose exec -T mysql mysql -uroot -ppassword --default-character-set=utf8mb4 ytsub_development db/reset: db/recreate db/migrate db/reset/dev: db/recreate/dev db/migrate/dev @@ -62,10 +62,10 @@ db/reset/test: db/recreate/test db/migrate/test db/recreate: db/recreate/dev db/recreate/test db/recreate/dev: - docker-compose exec -T mysql mysql -uroot -ppassword -e 'DROP DATABASE IF EXISTS ytsub_development; CREATE DATABASE ytsub_development;' + docker compose exec -T mysql mysql -uroot -ppassword -e 'DROP DATABASE IF EXISTS ytsub_development; CREATE DATABASE ytsub_development;' db/recreate/test: - docker-compose exec -T mysql mysql -uroot -ppassword -e 'DROP DATABASE IF EXISTS ytsub_test; CREATE DATABASE ytsub_test;' + docker compose exec -T mysql mysql -uroot -ppassword -e 'DROP DATABASE IF EXISTS ytsub_test; CREATE DATABASE ytsub_test;' db/migrate: db/migrate/dev db/migrate/test @@ -76,28 +76,28 @@ db/migrate/test: NODE_ENV=test pnpm knex migrate:latest db/log/view: - docker-compose exec mysql tail -f /var/lib/mysql/__general.log + docker compose exec mysql tail -f /var/lib/mysql/__general.log db/log/enable: - docker-compose exec -T mysql mysql -uroot -ppassword -e "SET global log_output = 'FILE'; SET global general_log_file='/var/lib/mysql/__general.log'; SET global general_log = 1;" + docker compose exec -T mysql mysql -uroot -ppassword -e "SET global log_output = 'FILE'; SET global general_log_file='/var/lib/mysql/__general.log'; SET global general_log = 1;" db/log/disable: - docker-compose exec -T mysql mysql -uroot -ppassword -e "SET global general_log = 0;" + docker compose exec -T mysql mysql -uroot -ppassword -e "SET global general_log = 0;" db/console/dev: - docker-compose exec mysql mysql -uroot -ppassword ytsub_development + docker compose exec mysql mysql -uroot -ppassword ytsub_development # # docker # docker/up: - docker-compose up -d - docker-compose run --rm dockerize -timeout 60s -wait tcp://mysql:3306 + docker compose up -d + docker compose run --rm dockerize -timeout 60s -wait tcp://mysql:3306 docker/down: - docker-compose down + docker compose down docker/clean: - docker-compose down -v --remove-orphans - docker-compose rm -f -s -v + docker compose down -v --remove-orphans + docker compose rm -f -s -v diff --git a/app/utils/opentelemetry-utils.ts b/app/utils/opentelemetry-utils.ts index feed502030..41f7ad3b0b 100644 --- a/app/utils/opentelemetry-utils.ts +++ b/app/utils/opentelemetry-utils.ts @@ -16,7 +16,7 @@ import { NodeSDK } from "@opentelemetry/sdk-node"; OTEL_SERVICE_NAME=dev OTEL_TRACES_EXPORTER=console pnpm dev # see logs on local jaeger -docker-compose up jaeger # open http://localhost:16686 +docker compose up jaeger # open http://localhost:16686 OTEL_SERVICE_NAME=dev OTEL_TRACES_EXPORTER=otlp OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/json pnpm dev ``` */