diff --git a/app.Dockerfile b/app.Dockerfile new file mode 100644 index 0000000..c5b26cb --- /dev/null +++ b/app.Dockerfile @@ -0,0 +1,3 @@ +FROM node:18 + +WORKDIR /app diff --git a/docker-compose.yml b/docker-compose.yml index 3e34b62..a2f5cf7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,32 @@ -version: "3" +version: "3.9" services: + app: + build: + context: . + dockerfile: app.Dockerfile + restart: always + env_file: + - .env + volumes: + - ./:/app + ports: + - 3000:3000 + command: npm run dev + depends_on: + - build-css + + build-css: + build: + context: . + dockerfile: app.Dockerfile + restart: always + tty: true + env_file: + - .env + volumes: + - ./:/app + command: npm run build-css + mock-server: image: mockserver/mockserver:5.15.0 ports: diff --git a/package.json b/package.json index 2e87b7a..0d49b60 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "private": true, "scripts": { "dev": "next dev", - "css": "tailwindcss --input ./src/styles/globals.css --output ./src/styles/output.css --watch", "build": "tailwindcss ./src/styles/globals.css --output ./src/styles/output.css && next build", + "build-css": "tailwindcss --input ./src/styles/globals.css --output ./src/styles/output.css --poll --watch", "test:watch": "vitest watch", "test": "vitest run --coverage", "test:e2e": "cypress open --e2e",