Browse Source

* Rmed prod

master
vvandenb 2 years ago
parent
commit
d2665bd984
  1. 17
      Makefile
  2. 4
      back/entrypoint.sh
  3. 2
      back/volume/src/pong/entity/result.entity.ts
  4. 4
      front/entrypoint.sh

17
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

4
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 ===";

2
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<User | null> // TODO: change to User[] for final version
players: Array<User | null>
@Column('text', { array: true })
public score: number[]

4
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;

Loading…
Cancel
Save