mirror of
https://github.com/twentyhq/twenty.git
synced 2026-06-12 01:46:39 -04:00
## Summary Follow-up to the Cloudflare/OpenNext migration (#20741). Now that the legacy `twenty-website` package was already removed in #20270, the `-new` suffix on the marketing site package is no longer meaningful. ## What changes - **Directory rename**: `git mv packages/twenty-website-new packages/twenty-website` (1213 files moved, no content change) - **Package + nx config**: `package.json` and `project.json` name fields updated, `sourceRoot` repointed - **Source refs**: `load-local-articles.ts` and `load-local-release-notes.ts` had a hardcoded `'twenty-website-new'` segment in their monorepo-root fallback path; `app/[locale]/releases/page.tsx` had display strings showing where to add content - **External refs**: root `package.json` workspaces, root `CLAUDE.md` / `README.md`, `twenty-sdk` + `create-twenty-app` READMEs, `.vscode/twenty.code-workspace`, `.cursor/rules/changelog-process.mdc`, Crowdin config + the three `website-i18n-*` CI workflows + `ci-website.yaml` - **Docker cleanup**: `packages/twenty-docker/twenty-website-new/Dockerfile` deleted; the two Makefile targets (`prod-website-new-build` / `prod-website-new-run`) that referenced it removed — EKS deploy was retired in the Cloudflare migration - **`yarn.lock`** regenerated against the new workspace path ## What's deliberately not in this PR The dev hostname `website-new.twenty-main.com` in `wrangler.jsonc` stays for now. Migrating it to `website.twenty-main.com` needs coordinated DNS deletion (current CNAME points at the legacy Docusaurus NLB and serves 503s) and removal of the matching legacy `website` Helm chart in `twenty-infra`. Flagged as a separate cleanup. Companion infra PR: https://github.com/twentyhq/twenty-infra/pull/682 (workflow paths + Terraform ECR + docs) ## Test plan - [x] `yarn install --immutable` resolves clean against the new path - [x] `npx nx typecheck twenty-website` passes - [x] `npx nx lint twenty-website` passes - [ ] CI on this PR confirms the same on a fresh checkout - [ ] After merge: trigger `Deploy Website` workflow against `environment=dev` to confirm the renamed working-directory deploys correctly
80 lines
3.1 KiB
Makefile
80 lines
3.1 KiB
Makefile
# Makefile for building and running Twenty CRM docker containers.
|
|
# Set the tag and/or target build platform using make command-line variables assignments.
|
|
#
|
|
# Optional make variables:
|
|
# PLATFORM - defaults to 'linux/amd64'
|
|
# TAG - defaults to 'latest'
|
|
#
|
|
# Example: make prod-build
|
|
# Example: make PLATFORM=linux/aarch64 TAG=my-tag prod-build
|
|
# Example: make postgres-on-docker (for local development)
|
|
|
|
PLATFORM ?= linux/amd64
|
|
TAG ?= latest
|
|
DOCKER_NETWORK=twenty_network
|
|
|
|
# =============================================================================
|
|
# Production Image Building
|
|
# =============================================================================
|
|
|
|
prod-build:
|
|
@cd ../.. && docker build --target twenty -f ./packages/twenty-docker/twenty/Dockerfile --platform $(PLATFORM) --tag twenty:$(TAG) . && cd -
|
|
|
|
prod-run:
|
|
@docker run -d -p 3000:3000 --name twenty twenty:$(TAG)
|
|
|
|
prod-postgres-run:
|
|
@docker run -d -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres --name twenty-postgres twenty-postgres:$(TAG)
|
|
|
|
# =============================================================================
|
|
# Local Development Services
|
|
# Run these from the repository root: make -C packages/twenty-docker <target>
|
|
# =============================================================================
|
|
|
|
ensure-docker-network:
|
|
docker network inspect $(DOCKER_NETWORK) >/dev/null 2>&1 || docker network create $(DOCKER_NETWORK)
|
|
|
|
postgres-on-docker: ensure-docker-network
|
|
docker run -d --network $(DOCKER_NETWORK) \
|
|
--name twenty_pg \
|
|
-e POSTGRES_USER=postgres \
|
|
-e POSTGRES_PASSWORD=postgres \
|
|
-e ALLOW_NOSSL=true \
|
|
-v twenty_db_data:/var/lib/postgresql/data \
|
|
-p 5432:5432 \
|
|
postgres:16
|
|
@echo "Waiting for PostgreSQL to be ready..."
|
|
@until docker exec twenty_pg psql -U postgres -d postgres \
|
|
-c 'SELECT pg_is_in_recovery();' 2>/dev/null | grep -q 'f'; do \
|
|
sleep 1; \
|
|
done
|
|
docker exec twenty_pg psql -U postgres -d postgres \
|
|
-c "CREATE DATABASE \"default\" WITH OWNER postgres;" \
|
|
-c "CREATE DATABASE \"test\" WITH OWNER postgres;"
|
|
|
|
redis-on-docker: ensure-docker-network
|
|
docker run -d --network $(DOCKER_NETWORK) --name twenty_redis -p 6379:6379 redis/redis-stack-server:latest
|
|
|
|
clickhouse-on-docker: ensure-docker-network
|
|
docker run -d --network $(DOCKER_NETWORK) --name twenty_clickhouse -p 8123:8123 -p 9000:9000 -e CLICKHOUSE_PASSWORD=devPassword clickhouse/clickhouse-server:latest \
|
|
|
|
grafana-on-docker: ensure-docker-network
|
|
docker run -d --network $(DOCKER_NETWORK) \
|
|
--name twenty_grafana \
|
|
-p 4000:3000 \
|
|
-e GF_SECURITY_ADMIN_USER=admin \
|
|
-e GF_SECURITY_ADMIN_PASSWORD=admin \
|
|
-e GF_INSTALL_PLUGINS=grafana-clickhouse-datasource \
|
|
-v $(PWD)/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources \
|
|
grafana/grafana-oss:latest
|
|
|
|
opentelemetry-collector-on-docker: ensure-docker-network
|
|
docker run -d --network $(DOCKER_NETWORK) \
|
|
--name twenty_otlp_collector \
|
|
-p 4317:4317 \
|
|
-p 4318:4318 \
|
|
-p 13133:13133 \
|
|
-v $(PWD)/otel-collector/otel-collector-config.yaml:/etc/otel-collector-config.yaml \
|
|
otel/opentelemetry-collector-contrib:latest \
|
|
--config /etc/otel-collector-config.yaml
|