diff --git a/Makefile b/Makefile index 3b7cec1..e4d9e0b 100644 --- a/Makefile +++ b/Makefile @@ -3,22 +3,19 @@ USER = gavaniwast all: clean dev -prod: - NODE_ENV="production" docker compose -f docker-compose.yml up --build - dev: - NODE_ENV="development" docker compose -f docker-compose.yml up --build + NODE_ENV="development" docker-compose up --build check: - NODE_ENV="check" docker compose -f docker-compose.yml run back --build - NODE_ENV="check" docker compose -f docker-compose.yml run front --build - docker compose -f docker-compose.yml down + NODE_ENV="check" docker-compose run back --build + NODE_ENV="check" docker-compose run front --build + docker-compose down debug: - NODE_ENV="debug" BUILDKIT_PROGRESS=plain docker compose -f docker-compose.yml up --build + NODE_ENV="debug" BUILDKIT_PROGRESS=plain docker-compose up --build stop: - docker compose -f docker-compose.yml down + docker-compose down clean: stop docker system prune -f @@ -29,4 +26,4 @@ fclean: stop re: fclean dev -.PHONY: all prod dev check debug stop clean fclean re +.PHONY: all dev check debug stop clean fclean re diff --git a/back/entrypoint.sh b/back/entrypoint.sh index a320752..624b05e 100644 --- a/back/entrypoint.sh +++ b/back/entrypoint.sh @@ -22,9 +22,7 @@ FT_OAUTH_CLIENT_SECRET=$FT_OAUTH_CLIENT_SECRET FT_OAUTH_CALLBACK_URL=$FT_OAUTH_CALLBACK_URL EOF -if [[ $NODE_ENV == "production" ]]; then - npm run build && npm run start:prod; -elif [[ $NODE_ENV == "debug" ]]; then +if [[ $NODE_ENV == "debug" ]]; then npm run start:debug; elif [[ $NODE_ENV == "check" ]]; then npm run format && npm run lint; echo "=== FINISH ==="; diff --git a/back/volume/src/pong/entity/result.entity.ts b/back/volume/src/pong/entity/result.entity.ts index 037dc33..86c7a43 100644 --- a/back/volume/src/pong/entity/result.entity.ts +++ b/back/volume/src/pong/entity/result.entity.ts @@ -17,7 +17,7 @@ export default class Result { ranked: boolean @ManyToMany(() => User, (player: User) => player.results, { cascade: true }) - players: Array // TODO: change to User[] for final version + players: Array @Column('text', { array: true }) public score: number[] diff --git a/front/entrypoint.sh b/front/entrypoint.sh index 18d3161..d946975 100644 --- a/front/entrypoint.sh +++ b/front/entrypoint.sh @@ -6,9 +6,7 @@ VITE_BACK_PORT=$BACK_PORT EOF npm install; -if [[ $NODE_ENV == "production" ]]; then - npm run build && npm run preview; -elif [[ $NODE_ENV == "development" ]]; then +if [[ $NODE_ENV == "development" ]]; then npm run dev; elif [[ $NODE_ENV == "debug" ]]; then npm run dev;