aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--backend/docker/compose.yml8
-rw-r--r--frontend/docker/compose.dev.yml13
-rw-r--r--frontend/package.json1
-rw-r--r--package-lock.json1
-rw-r--r--turbo.json8
5 files changed, 21 insertions, 10 deletions
diff --git a/backend/docker/compose.yml b/backend/docker/compose.yml
index f8c7be4ab..b293e5628 100644
--- a/backend/docker/compose.yml
+++ b/backend/docker/compose.yml
@@ -22,6 +22,7 @@ services:
api-server:
container_name: monkeytype-api-server
image: node:18.20.4
+ user: "node" ##this works as long as your local user has uid=1000
restart: on-failure
depends_on:
- redis
@@ -32,11 +33,12 @@ services:
ports:
- "${DOCKER_SERVER_PORT:-5005}:5005"
volumes:
- - be-modules:/monkeytype/backend/node_modules
- ../../:/monkeytype
- entrypoint: 'bash -c "cd /monkeytype/backend && npm install && npm run dev"'
+ entrypoint: 'bash -c "echo starting, this may take a while... \
+ && cd /monkeytype \
+ && npm i --prefer-offline --no-audit \
+ && npm run dev-be"'
volumes:
mongo-data:
redis-data:
- be-modules:
diff --git a/frontend/docker/compose.dev.yml b/frontend/docker/compose.dev.yml
index 63abaff30..57713f14d 100644
--- a/frontend/docker/compose.dev.yml
+++ b/frontend/docker/compose.dev.yml
@@ -3,6 +3,7 @@ services:
frontend:
container_name: monkeytype-frontend
image: node:18.20.4
+ user: "node" ##this works as long as your local user has uid=1000
# restart: on-failure
environment:
- SERVER_OPEN=false
@@ -10,13 +11,11 @@ services:
ports:
- "${DOCKER_HTTP_PORT:-3000}:3000"
volumes:
- - root-modules:/monkeytype/node_modules
- - fe-modules:/monkeytype/frontend/node_modules
- ../../:/monkeytype
- entrypoint: 'bash -c "cd /monkeytype && npm install && cd /monkeytype/frontend && npm install && npm run dev"'
- # entrypoint: "tail -f /dev/null"
+ entrypoint: 'bash -c "echo starting, this may take a while... \
+ && cd /monkeytype \
+ && npm i --prefer-offline --no-audit \
+ && export SERVER_OPEN=false \
+ && npm run dev-fe"'
-volumes:
- root-modules:
- fe-modules:
diff --git a/frontend/package.json b/frontend/package.json
index 9b853d710..3a5cead84 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -46,6 +46,7 @@
"@vitest/coverage-v8": "1.6.0",
"ajv": "8.12.0",
"autoprefixer": "10.4.14",
+ "concurrently": "8.2.2",
"dotenv": "16.4.5",
"eslint": "8.57.0",
"firebase-tools": "13.13.3",
diff --git a/package-lock.json b/package-lock.json
index fde55a53e..14eb107cd 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -177,6 +177,7 @@
"@vitest/coverage-v8": "1.6.0",
"ajv": "8.12.0",
"autoprefixer": "10.4.14",
+ "concurrently": "8.2.2",
"dotenv": "16.4.5",
"eslint": "8.57.0",
"firebase-tools": "13.13.3",
diff --git a/turbo.json b/turbo.json
index 1b4a183c9..a77ecd8e8 100644
--- a/turbo.json
+++ b/turbo.json
@@ -29,6 +29,14 @@
"@monkeytype/frontend#build": {
"dependsOn": ["^build"],
"env": ["BACKEND_URL", "RECAPTCHA_SITE_KEY"]
+ },
+ "@monkeytype/frontend#dev": {
+ "dependsOn": ["^build"],
+ "env": ["BACKEND_URL", "RECAPTCHA_SITE_KEY", "SERVER_OPEN"]
+ },
+ "@monkeytype/backend#dev": {
+ "dependsOn": ["^build"],
+ "env": ["DB_URI", "REDIS_URI", "PORT"]
}
}
}