π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
refactor: update paths and structure for server services in Docker and documentation (#7333)
Nikhil805cfed1a3e3
diff --git a/.github/workflows/build-test-pull-request.yml b/.github/workflows/build-test-pull-request.ymlindex 227425c8f1..acbd9d26eb 100644--- a/.github/workflows/build-test-pull-request.yml+++ b/.github/workflows/build-test-pull-request.yml@@ -6,7 +6,7 @@ on:types: ["opened", "synchronize", "ready_for_review"]jobs:- lint-apiserver:+ lint-server:if: github.event.pull_request.draft == falseruns-on: ubuntu-lateststeps:@@ -17,10 +17,10 @@ jobs:python-version: "3.x" # Specify the Python version you need- name: Install Pylintrun: python -m pip install ruff- - name: Install Apiserver Dependencies- run: cd apiserver && pip install -r requirements.txt- - name: Lint apiserver- run: ruff check --fix apiserver+ - name: Install Server Dependencies+ run: cd apps/server && pip install -r requirements.txt+ - name: Lint apps/server+ run: ruff check --fix apps/serverlint-admin:if: github.event.pull_request.draft == falsediff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 4a15675208..01a4ff5ad5 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -25,6 +25,7 @@ When opening a new issue, please use a clear and concise title that follows this- For documentation: `π Docs: [short description]`**Examples:**+- `π Bug: API token expiry time not saving correctly`- `π Docs: Clarify RAM requirement for local setup`- `π Feature: Allow custom time selection for token expiration`@@ -47,7 +48,7 @@ This helps us triage and manage issues more efficiently.The project is a monorepo, with backend api and frontend in a single repo.-The backend is a django project which is kept inside apiserver+The backend is a django project which is kept inside apps/server1. Clone the repo@@ -105,11 +106,13 @@ To ensure consistency throughout the source code, please keep these rules in min- **Improve documentation** - fix incomplete or missing [docs](https://docs.plane.so/), bad wording, examples or explanations.## Contributing to language support+This guide is designed to help contributors understand how to add or update translations in the application.### Understanding translation structure#### File organization+Translations are organized by language in the locales directory. Each language has its own folder containing JSON files for translations. Here's how it looks:```@@ -122,7 +125,9 @@ packages/i18n/src/locales/βββ [language]/βββ translations.json```+#### Nested structure+To keep translations organized, we use a nested structure for keys. This makes it easier to manage and locate specific translations. For example:```json@@ -137,32 +142,37 @@ To keep translations organized, we use a nested structure for keys. This makes i```### Translation formatting guide+We use [IntlMessageFormat](https://formatjs.github.io/docs/intl-messageformat/) to handle dynamic content, such as variables and pluralization. Here's how to format your translations:#### Examples+- **Simple variables**- ```json- {++ ```json+ {"greeting": "Hello, {name}!"- }- ```+ }+ ```- **Pluralization**- ```json- {+ ```json+ {"items": "{count, plural, one {Work item} other {Work items}}"- }- ```+ }+ ```### Contributing guidelines#### Updating existing translations+1. Locate the key in `locales/<language>/translations.json`.2. Update the value while ensuring the key structure remains intact.3. Preserve any existing ICU formats (e.g., variables, pluralization).#### Adding new translation keys+1. When introducing a new key, ensure it is added to **all** language files, even if translations are not immediately available. Use English as a placeholder if needed.2. Keep the nesting structure consistent across all languages.@@ -170,48 +180,50 @@ We use [IntlMessageFormat](https://formatjs.github.io/docs/intl-messageformat/)3. If the new key requires dynamic content (e.g., variables or pluralization), ensure the ICU format is applied uniformly across all languages.### Adding new languages+Adding a new language involves several steps to ensure it integrates seamlessly with the project. Follow these instructions carefully:-1. **Update type definitions**-Add the new language to the TLanguage type in the language definitions file:+1. **Update type definitions**+ Add the new language to the TLanguage type in the language definitions file:- ```typescript- // types/language.ts- export type TLanguage = "en" | "fr" | "your-lang";- ```+ ```typescript+ // types/language.ts+ export type TLanguage = "en" | "fr" | "your-lang";+ ```-2. **Add language configuration**-Include the new language in the list of supported languages:+2. **Add language configuration**+ Include the new language in the list of supported languages:- ```typescript- // constants/language.ts- export const SUPPORTED_LANGUAGES: ILanguageOption[] = [- { label: "English", value: "en" },- { label: "Your Language", value: "your-lang" }- ];- ```+ ```typescript+ // constants/language.ts+ export const SUPPORTED_LANGUAGES: ILanguageOption[] = [+ { label: "English", value: "en" },+ { label: "Your Language", value: "your-lang" }+ ];+ ```-3. **Create translation files**- 1. Create a new folder for your language under locales (e.g., `locales/your-lang/`).+3. **Create translation files**+ 1. Create a new folder for your language under locales (e.g., `locales/your-lang/`).2. Add a `translations.json` file inside the folder.3. Copy the structure from an existing translation file and translate all keys.-4. **Update import logic**-Modify the language import logic to include your new language:+4. **Update import logic**+ Modify the language import logic to include your new language:- ```typescript- private importLanguageFile(language: TLanguage): Promise<any> {- switch (language) {- case "your-lang":- return import("../locales/your-lang/translations.json");- // ...- }- }- ```+ ```typescript+ private importLanguageFile(language: TLanguage): Promise<any> {+ switch (language) {+ case "your-lang":+ return import("../locales/your-lang/translations.json");+ // ...+ }+ }+ ```### Quality checklist+Before submitting your contribution, please ensure the following:- All translation keys exist in every language file.@@ -222,6 +234,7 @@ Before submitting your contribution, please ensure the following:- There are no missing or untranslated keys.#### Pro tips+- When in doubt, refer to the English translations for context.- Verify pluralization works with different numbers.- Ensure dynamic values (e.g., `{name}`) are correctly interpolated.diff --git a/ENV_SETUP.md b/ENV_SETUP.mdindex 775d6a55f4..54e0415a5f 100644--- a/ENV_SETUP.md+++ b/ENV_SETUP.md@@ -36,7 +36,7 @@ USE_MINIO=1NGINX_PORT=80```-## {PROJECT_FOLDER}/apiserver/.env+## {PROJECT_FOLDER}/apps/server/.env```# Backend@@ -63,8 +63,6 @@ AWS_S3_ENDPOINT_URL="http://plane-minio:9000"AWS_S3_BUCKET_NAME="uploads"# Maximum file upload limitFILE_SIZE_LIMIT=5242880-# Settings related to Docker-DOCKERIZED=1 # deprecated# set to 1 If using the pre-configured minio setupUSE_MINIO=1# Nginx Configuration@@ -78,11 +76,15 @@ ADMIN_BASE_URL=SPACE_BASE_URL=APP_BASE_URL=SECRET_KEY="gxoytl7dmnc1y37zahah820z5iq3iozu38cnfjtu3yaau9cd9z"+# RabbitMQ Settings+RABBITMQ_HOST="plane-mq"+RABBITMQ_PORT="5672"+RABBITMQ_USER="plane"+RABBITMQ_PASSWORD="plane"+RABBITMQ_VHOST="plane"+AMQP_URL=""+# Authentication Settings+ENABLE_SIGNUP=1+ENABLE_EMAIL_PASSWORD=1+ENABLE_MAGIC_LINK_LOGIN=0```--## Updatesβ--- The naming convention for containers and images has been updated.-- The plane-worker image will no longer be maintained, as it has been merged with plane-backend.-- The Tiptap pro-extension dependency has been removed, eliminating the need for Tiptap API keys.-- The image name for Plane deployment has been changed to plane-space.diff --git a/aio/Dockerfile-app b/aio/Dockerfile-appindex 7ffe3f803b..b209ce70e4 100644--- a/aio/Dockerfile-app+++ b/aio/Dockerfile-app@@ -70,18 +70,18 @@ ENV PYTHONDONTWRITEBYTECODE=1ENV PYTHONUNBUFFERED=1ENV PIP_DISABLE_PIP_VERSION_CHECK=1-COPY apiserver/requirements.txt ./api/-COPY apiserver/requirements ./api/requirements+COPY apps/server/requirements.txt ./api/+COPY apps/server/requirements ./api/requirementsRUN pip install -r ./api/requirements.txt --compile --no-cache-dir# Add in Django deps and generate Django's static files-COPY apiserver/manage.py ./api/manage.py-COPY apiserver/plane ./api/plane/-COPY apiserver/templates ./api/templates/+COPY apps/server/manage.py ./api/manage.py+COPY apps/server/plane ./api/plane/+COPY apps/server/templates ./api/templates/COPY package.json ./api/package.json-COPY apiserver/bin ./api/bin/+COPY apps/server/bin ./api/bin/RUN chmod +x ./api/bin/*RUN chmod -R 777 ./api/diff --git a/apps/server/Procfile b/apps/server/Procfiledeleted file mode 100644index 63736e8e8a..0000000000--- a/apps/server/Procfile+++ /dev/null@@ -1,3 +0,0 @@-web: gunicorn -w 4 -k uvicorn.workers.UvicornWorker plane.asgi:application --bind 0.0.0.0:$PORT --max-requests 10000 --max-requests-jitter 1000 --access-logfile --worker: celery -A plane worker -l info-beat: celery -A plane beat -l INFO\ No newline at end of filediff --git a/apps/server/runtime.txt b/apps/server/runtime.txtdeleted file mode 100644index 4937ae149a..0000000000--- a/apps/server/runtime.txt+++ /dev/null@@ -1 +0,0 @@-python-3.12.6\ No newline at end of filediff --git a/deploy/selfhost/build.yml b/deploy/selfhost/build.ymlindex b65d297e9f..aa5306fb46 100644--- a/deploy/selfhost/build.yml+++ b/deploy/selfhost/build.yml@@ -20,7 +20,7 @@ services:api:image: ${DOCKERHUB_USER:-local}/plane-backend:${APP_RELEASE:-latest}build:- context: ./apiserver+ context: ./apps/serverdockerfile: ./Dockerfile.apiproxy:diff --git a/docker-compose-local.yml b/docker-compose-local.ymlindex 86457615a9..257780143a 100644--- a/docker-compose-local.yml+++ b/docker-compose-local.yml@@ -122,7 +122,7 @@ services:api:build:- context: ./apiserver+ context: ./apps/serverdockerfile: Dockerfile.devargs:DOCKER_BUILDKIT: 1@@ -130,10 +130,10 @@ services:networks:- dev_envvolumes:- - ./apiserver:/code+ - ./apps/server:/codecommand: ./bin/docker-entrypoint-api-local.shenv_file:- - ./apiserver/.env+ - ./apps/server/.envdepends_on:- plane-db- plane-redis@@ -143,7 +143,7 @@ services:worker:build:- context: ./apiserver+ context: ./apps/serverdockerfile: Dockerfile.devargs:DOCKER_BUILDKIT: 1@@ -151,10 +151,10 @@ services:networks:- dev_envvolumes:- - ./apiserver:/code+ - ./apps/server:/codecommand: ./bin/docker-entrypoint-worker.shenv_file:- - ./apiserver/.env+ - ./apps/server/.envdepends_on:- api- plane-db@@ -162,7 +162,7 @@ services:beat-worker:build:- context: ./apiserver+ context: ./apps/serverdockerfile: Dockerfile.devargs:DOCKER_BUILDKIT: 1@@ -170,10 +170,10 @@ services:networks:- dev_envvolumes:- - ./apiserver:/code+ - ./apps/server:/codecommand: ./bin/docker-entrypoint-beat.shenv_file:- - ./apiserver/.env+ - ./apps/server/.envdepends_on:- api- plane-db@@ -181,7 +181,7 @@ services:migrator:build:- context: ./apiserver+ context: ./apps/serverdockerfile: Dockerfile.devargs:DOCKER_BUILDKIT: 1@@ -189,10 +189,10 @@ services:networks:- dev_envvolumes:- - ./apiserver:/code+ - ./apps/server:/codecommand: ./bin/docker-entrypoint-migrator.sh --settings=plane.settings.localenv_file:- - ./apiserver/.env+ - .envdepends_on:- plane-db- plane-redisdiff --git a/docker-compose.yml b/docker-compose.ymlindex 861fa9dd89..184b514c10 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -40,14 +40,14 @@ services:api:container_name: apibuild:- context: ./apiserver+ context: ./apps/serverdockerfile: Dockerfile.apiargs:DOCKER_BUILDKIT: 1restart: alwayscommand: ./bin/docker-entrypoint-api.shenv_file:- - ./apiserver/.env+ - ./apps/server/.envdepends_on:- plane-db- plane-redis@@ -55,14 +55,14 @@ services:worker:container_name: bgworkerbuild:- context: ./apiserver+ context: ./apps/serverdockerfile: Dockerfile.apiargs:DOCKER_BUILDKIT: 1restart: alwayscommand: ./bin/docker-entrypoint-worker.shenv_file:- - ./apiserver/.env+ - ./apps/server/.envdepends_on:- api- plane-db@@ -71,14 +71,14 @@ services:beat-worker:container_name: beatworkerbuild:- context: ./apiserver+ context: ./apps/serverdockerfile: Dockerfile.apiargs:DOCKER_BUILDKIT: 1restart: alwayscommand: ./bin/docker-entrypoint-beat.shenv_file:- - ./apiserver/.env+ - ./apps/server/.envdepends_on:- api- plane-db@@ -87,14 +87,14 @@ services:migrator:container_name: plane-migratorbuild:- context: ./apiserver+ context: ./apps/serverdockerfile: Dockerfile.apiargs:DOCKER_BUILDKIT: 1restart: nocommand: ./bin/docker-entrypoint-migrator.shenv_file:- - ./apiserver/.env+ - ./apps/server/.envdepends_on:- plane-db- plane-redisdiff --git a/heroku.yml b/heroku.ymldeleted file mode 100644index e9d2ac0337..0000000000--- a/heroku.yml+++ /dev/null@@ -1,3 +0,0 @@-build:- docker:- web: deploy/heroku/Dockerfile\ No newline at end of filediff --git a/setup.sh b/setup.shindex c19a29abf9..5d87c84467 100755--- a/setup.sh+++ b/setup.sh@@ -44,20 +44,23 @@ export LC_CTYPE=Cecho -e "${YELLOW}Setting up environment files...${NC}"# Copy all environment example files-services=("" "web" "apiserver" "space" "admin" "live")+services=("" "web" "server" "space" "admin" "live")success=truefor service in "${services[@]}"; do- prefix="./"- if [ "$service" != "" ]; then- prefix="./$service/"+ if [ "$service" == "" ]; then+ # Handle root .env file+ prefix="./"+ else+ # Handle service .env files in apps folder+ prefix="./apps/$service/"ficopy_env_file "${prefix}.env.example" "${prefix}.env" || success=falsedone# Generate SECRET_KEY for Django-if [ -f "./apiserver/.env" ]; then+if [ -f "./apps/server/.env" ]; thenecho -e "\n${YELLOW}Generating Django SECRET_KEY...${NC}"SECRET_KEY=$(tr -dc 'a-z0-9' < /dev/urandom | head -c50)@@ -66,11 +69,11 @@ if [ -f "./apiserver/.env" ]; thenecho -e "${RED}Ensure 'tr' and 'head' commands are available on your system.${NC}"success=falseelse- echo -e "SECRET_KEY=\"$SECRET_KEY\"" >> ./apiserver/.env- echo -e "${GREEN}β${NC} Added SECRET_KEY to apiserver/.env"+ echo -e "SECRET_KEY=\"$SECRET_KEY\"" >> ./apps/server/.env+ echo -e "${GREEN}β${NC} Added SECRET_KEY to apps/server/.env"fielse- echo -e "${RED}β${NC} apiserver/.env not found. SECRET_KEY not added."+ echo -e "${RED}β${NC} apps/server/.env not found. SECRET_KEY not added."success=falsefi