Skip to content

Commit

Permalink
chore: add docker to local develop
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasrosa committed Mar 11, 2024
1 parent 9be0764 commit a82f87f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
3 changes: 3 additions & 0 deletions app.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM node:18

WORKDIR /app
29 changes: 28 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit a82f87f

Please sign in to comment.