From 3d16ad8efdc3703cd18b6ee3327f92032b4e8b06 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Tue, 2 Jan 2024 14:31:21 +0100 Subject: [PATCH] Fix docker install to have all projects (#3200) * Fix docker install to have all projects * Fix * Fixes --- packages/twenty-docker/Makefile | 11 +++++------ packages/twenty-docker/dev/docker-compose.yml | 16 ++++++++++------ packages/twenty-docker/dev/twenty-dev/Dockerfile | 8 -------- .../contributor/local-setup/docker-setup.mdx | 4 ++++ 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/packages/twenty-docker/Makefile b/packages/twenty-docker/Makefile index 4cc919fa2f..5e5bc122c6 100644 --- a/packages/twenty-docker/Makefile +++ b/packages/twenty-docker/Makefile @@ -1,13 +1,12 @@ dev-build: @docker compose -f dev/docker-compose.yml down - rm -rf ../twenty-front/node_modules - rm -rf ../twenty-server/node_modules - rm -rf ../twenty-docs/node_modules + @docker volume rm twenty_dev_node_modules_root > /dev/null 2>&1 || true + @docker volume rm twenty_dev_node_modules_docs > /dev/null 2>&1 || true + @docker volume rm twenty_dev_node_modules_eslint > /dev/null 2>&1 || true @docker volume rm twenty_dev_node_modules_front > /dev/null 2>&1 || true @docker volume rm twenty_dev_node_modules_server > /dev/null 2>&1 || true - @docker volume rm twenty_dev_node_modules_docs > /dev/null 2>&1 || true - @docker volume rm twenty_dev_node_modules_root > /dev/null 2>&1 || true - @docker volume rm twenty_dev_node_modules_yarn > /dev/null 2>&1 || true + @docker volume rm twenty_dev_node_modules_website > /dev/null 2>&1 || true + @docker volume rm twenty_dev_node_modules_zapier > /dev/null 2>&1 || true @docker compose -f dev/docker-compose.yml build dev-up: diff --git a/packages/twenty-docker/dev/docker-compose.yml b/packages/twenty-docker/dev/docker-compose.yml index 2b0d648e76..153bf36441 100644 --- a/packages/twenty-docker/dev/docker-compose.yml +++ b/packages/twenty-docker/dev/docker-compose.yml @@ -9,13 +9,14 @@ services: - "3001:3001" - "6006:6006" volumes: - - ../../../packages/twenty-front:/app/packages/twenty-front - - ../../../packages/twenty-server:/app/packages/twenty-server - - ../../../packages/eslint-plugin-twenty:/app/packages/eslint-plugin-twenty + - ../../..:/app - twenty_dev_node_modules_root:/app/node_modules - - twenty_dev_node_modules_yarn:/app/.yarn + - twenty_dev_node_modules_docs:/app/packages/twenty-docs/node_modules + - twenty_dev_node_modules_eslint:/app/packages/eslint-plugin-twenty/node_modules - twenty_dev_node_modules_front:/app/packages/twenty-front/node_modules - twenty_dev_node_modules_server:/app/packages/twenty-server/node_modules + - twenty_dev_node_modules_website:/app/packages/twenty-website/node_modules + - twenty_dev_node_modules_zapier:/app/packages/twenty-zapier/node_modules depends_on: - postgres postgres: @@ -33,7 +34,10 @@ volumes: twenty_db_data: name: twenty_db_data twenty_dev_node_modules_root: - twenty_dev_node_modules_yarn: + twenty_dev_node_modules_docs: + twenty_dev_node_modules_eslint: twenty_dev_node_modules_front: twenty_dev_node_modules_server: - twenty_dev_node_modules_docs: + twenty_dev_node_modules_website: + twenty_dev_node_modules_zapier: + diff --git a/packages/twenty-docker/dev/twenty-dev/Dockerfile b/packages/twenty-docker/dev/twenty-dev/Dockerfile index db4fd5af54..cba5ad0025 100644 --- a/packages/twenty-docker/dev/twenty-dev/Dockerfile +++ b/packages/twenty-docker/dev/twenty-dev/Dockerfile @@ -1,14 +1,6 @@ FROM node:18.16-bullseye as twenty-dev WORKDIR /app -COPY ./package.json . -COPY ./yarn.lock . -COPY ./.yarnrc.yml . -COPY ./.yarn/releases /app/.yarn/releases -COPY ./packages/twenty-front/package.json /app/packages/twenty-front/package.json -COPY ./packages/twenty-server/package.json /app/packages/twenty-server/package.json -COPY ./packages/twenty-server/patches /app/packages/twenty-server/patches -COPY ./packages/eslint-plugin-twenty/package.json /app/packages/eslint-plugin-twenty/package.json RUN npx playwright install-deps diff --git a/packages/twenty-docs/docs/contributor/local-setup/docker-setup.mdx b/packages/twenty-docs/docs/contributor/local-setup/docker-setup.mdx index b1379332f2..375ef8178c 100644 --- a/packages/twenty-docs/docs/contributor/local-setup/docker-setup.mdx +++ b/packages/twenty-docs/docs/contributor/local-setup/docker-setup.mdx @@ -118,6 +118,10 @@ You should now have: Sign in using a seeded demo account `tim@apple.dev` (password: `Applecar2025`) to start using Twenty. +## Step 6: Configure your IDE + +As you are executing the project inside a Docker container, you need to configure your IDE to use the same environment. +You can find the instructions for your IDE in our [IDE setup](/contributor/local-setup/ide-setup) guide. ### Troubleshooting