diff --git a/.gitignore b/.gitignore index 949de91..b1c349f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -volumes/ssl/transcendence.pem +Makefile.linux diff --git a/Makefile b/Makefile index 1c21cc4..4d560b1 100644 --- a/Makefile +++ b/Makefile @@ -13,18 +13,18 @@ $(CERT): mv $(NAME).pem volumes/ssl start: $(CERT) - sudo docker compose -f docker-compose.yml up --build + BACK_RUN=start docker compose -f docker-compose.yml up --build debug: $(CERT) - sudo BUILDKIT_PROGRESS=plain docker compose -f docker-compose.yml up --build + BUILDKIT_PROGRESS=plain BACK_RUN=start:debug docker compose -f docker-compose.yml up --build stop: - sudo docker compose -f docker-compose.yml down + docker compose -f docker-compose.yml down clean: stop - sudo docker system prune -f + docker system prune -f fclean: stop - sudo docker system prune -af --volumes + docker system prune -af --volumes re: fclean start diff --git a/cont/back/Dockerfile b/cont/back/Dockerfile index e172324..ed141a7 100644 --- a/cont/back/Dockerfile +++ b/cont/back/Dockerfile @@ -4,5 +4,5 @@ RUN apk update && apk upgrade && apk add npm \ && npm install -g @nestjs/cli WORKDIR /var/www/html -ENTRYPOINT npm install && npm run build && npm run start +ENTRYPOINT npm install && npm run build && npm run $RUN diff --git a/cont/front/Dockerfile b/cont/front/Dockerfile index 2978607..382d7cb 100644 --- a/cont/front/Dockerfile +++ b/cont/front/Dockerfile @@ -1,8 +1,6 @@ FROM alpine:3.15 RUN apk update && apk upgrade && apk add npm - -RUN mkdir -p /var/ssl - WORKDIR /var/www/html -ENTRYPOINT npm install && npm run build && npm run dev + +ENTRYPOINT npm install && npm run dev diff --git a/docker-compose.yml b/docker-compose.yml index 9991724..db811af 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,6 +17,8 @@ services: container_name: back build: cont/back/ env_file: .env + environment: + - RUN=${BACK_RUN} depends_on: [postgres] ports: [3001:3001] networks: [transcendence] diff --git a/volumes/front/vite.config.ts b/volumes/front/vite.config.ts index b24153b..d6e17b6 100644 --- a/volumes/front/vite.config.ts +++ b/volumes/front/vite.config.ts @@ -5,6 +5,6 @@ import { svelte } from '@sveltejs/vite-plugin-svelte' export default defineConfig({ plugins: [svelte()], server: { - port: 80, - }, + port: 80 + } })