mirror of
https://github.com/makeplane/plane.git
synced 2025-12-16 11:57:56 +01:00
[WEB-3991] chore: local dev improvements (#6991)
* chore: local dev improvements * chore: pr feedback * chore: fix setup * fix: env variables updated in .env.example files * fix(local): sign in to admin and web * chore: update minio deployment to create an bucket automatically on startup. * chore: resolve merge conflict * chore: updated api env with live base path --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com> Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
|||||||
node_modules
|
node_modules
|
||||||
.next
|
.next
|
||||||
|
.yarn
|
||||||
|
|
||||||
### NextJS ###
|
### NextJS ###
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|||||||
1
.yarnrc.yml
Normal file
1
.yarnrc.yml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
nodeLinker: node-modules
|
||||||
@@ -35,11 +35,12 @@ This helps us triage and manage issues more efficiently.
|
|||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
- Node.js version v16.18.0
|
- Docker Engine installed and running
|
||||||
|
- Node.js version 20+ [LTS version](https://nodejs.org/en/about/previous-releases)
|
||||||
- Python version 3.8+
|
- Python version 3.8+
|
||||||
- Postgres version v14
|
- Postgres version v14
|
||||||
- Redis version v6.2.7
|
- Redis version v6.2.7
|
||||||
- **Memory**: Minimum **12 GB RAM** recommended
|
- **Memory**: Minimum **12 GB RAM** recommended
|
||||||
> ⚠️ Running the project on a system with only 8 GB RAM may lead to setup failures or memory crashes (especially during Docker container build/start or dependency install). Use cloud environments like GitHub Codespaces or upgrade local RAM if possible.
|
> ⚠️ Running the project on a system with only 8 GB RAM may lead to setup failures or memory crashes (especially during Docker container build/start or dependency install). Use cloud environments like GitHub Codespaces or upgrade local RAM if possible.
|
||||||
|
|
||||||
### Setup the project
|
### Setup the project
|
||||||
@@ -68,6 +69,17 @@ chmod +x setup.sh
|
|||||||
docker compose -f docker-compose-local.yml up
|
docker compose -f docker-compose-local.yml up
|
||||||
```
|
```
|
||||||
|
|
||||||
|
5. Start web apps:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
yarn dev
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Open your browser to http://localhost:3001/god-mode/ and register yourself as instance admin
|
||||||
|
7. Open up your browser to http://localhost:3000 then log in using the same credentials from the previous step
|
||||||
|
|
||||||
|
That’s it! You’re all set to begin coding. Remember to refresh your browser if changes don’t auto-reload. Happy contributing! 🎉
|
||||||
|
|
||||||
## Missing a Feature?
|
## Missing a Feature?
|
||||||
|
|
||||||
If a feature is missing, you can directly _request_ a new one [here](https://github.com/makeplane/plane/issues/new?assignees=&labels=feature&template=feature_request.yml&title=%F0%9F%9A%80+Feature%3A+). You also can do the same by choosing "🚀 Feature" when raising a [New Issue](https://github.com/makeplane/plane/issues/new/choose) on our GitHub Repository.
|
If a feature is missing, you can directly _request_ a new one [here](https://github.com/makeplane/plane/issues/new?assignees=&labels=feature&template=feature_request.yml&title=%F0%9F%9A%80+Feature%3A+). You also can do the same by choosing "🚀 Feature" when raising a [New Issue](https://github.com/makeplane/plane/issues/new/choose) on our GitHub Repository.
|
||||||
@@ -93,7 +105,7 @@ 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.
|
- **Improve documentation** - fix incomplete or missing [docs](https://docs.plane.so/), bad wording, examples or explanations.
|
||||||
|
|
||||||
## Contributing to language support
|
## Contributing to language support
|
||||||
This guide is designed to help contributors understand how to add or update translations in the application.
|
This guide is designed to help contributors understand how to add or update translations in the application.
|
||||||
|
|
||||||
### Understanding translation structure
|
### Understanding translation structure
|
||||||
|
|
||||||
@@ -108,7 +120,7 @@ packages/i18n/src/locales/
|
|||||||
├── fr/
|
├── fr/
|
||||||
│ └── translations.json
|
│ └── translations.json
|
||||||
└── [language]/
|
└── [language]/
|
||||||
└── translations.json
|
└── translations.json
|
||||||
```
|
```
|
||||||
#### Nested structure
|
#### 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:
|
To keep translations organized, we use a nested structure for keys. This makes it easier to manage and locate specific translations. For example:
|
||||||
@@ -128,14 +140,14 @@ To keep translations organized, we use a nested structure for keys. This makes i
|
|||||||
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:
|
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
|
#### Examples
|
||||||
- **Simple variables**
|
- **Simple variables**
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"greeting": "Hello, {name}!"
|
"greeting": "Hello, {name}!"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- **Pluralization**
|
- **Pluralization**
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"items": "{count, plural, one {Work item} other {Work items}}"
|
"items": "{count, plural, one {Work item} other {Work items}}"
|
||||||
@@ -160,15 +172,15 @@ We use [IntlMessageFormat](https://formatjs.github.io/docs/intl-messageformat/)
|
|||||||
### Adding new languages
|
### Adding new languages
|
||||||
Adding a new language involves several steps to ensure it integrates seamlessly with the project. Follow these instructions carefully:
|
Adding a new language involves several steps to ensure it integrates seamlessly with the project. Follow these instructions carefully:
|
||||||
|
|
||||||
1. **Update type definitions**
|
1. **Update type definitions**
|
||||||
Add the new language to the TLanguage type in the language definitions file:
|
Add the new language to the TLanguage type in the language definitions file:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
// types/language.ts
|
// types/language.ts
|
||||||
export type TLanguage = "en" | "fr" | "your-lang";
|
export type TLanguage = "en" | "fr" | "your-lang";
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Add language configuration**
|
2. **Add language configuration**
|
||||||
Include the new language in the list of supported languages:
|
Include the new language in the list of supported languages:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
@@ -179,14 +191,14 @@ Include the new language in the list of supported languages:
|
|||||||
];
|
];
|
||||||
```
|
```
|
||||||
|
|
||||||
3. **Create translation files**
|
3. **Create translation files**
|
||||||
1. Create a new folder for your language under locales (e.g., `locales/your-lang/`).
|
1. Create a new folder for your language under locales (e.g., `locales/your-lang/`).
|
||||||
|
|
||||||
2. Add a `translations.json` file inside the folder.
|
2. Add a `translations.json` file inside the folder.
|
||||||
|
|
||||||
3. Copy the structure from an existing translation file and translate all keys.
|
3. Copy the structure from an existing translation file and translate all keys.
|
||||||
|
|
||||||
4. **Update import logic**
|
4. **Update import logic**
|
||||||
Modify the language import logic to include your new language:
|
Modify the language import logic to include your new language:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
|||||||
55
README.md
55
README.md
@@ -47,10 +47,10 @@ Meet [Plane](https://plane.so/), an open-source project management tool to track
|
|||||||
|
|
||||||
Getting started with Plane is simple. Choose the setup that works best for you:
|
Getting started with Plane is simple. Choose the setup that works best for you:
|
||||||
|
|
||||||
- **Plane Cloud**
|
- **Plane Cloud**
|
||||||
Sign up for a free account on [Plane Cloud](https://app.plane.so)—it's the fastest way to get up and running without worrying about infrastructure.
|
Sign up for a free account on [Plane Cloud](https://app.plane.so)—it's the fastest way to get up and running without worrying about infrastructure.
|
||||||
|
|
||||||
- **Self-host Plane**
|
- **Self-host Plane**
|
||||||
Prefer full control over your data and infrastructure? Install and run Plane on your own servers. Follow our detailed [deployment guides](https://developers.plane.so/self-hosting/overview) to get started.
|
Prefer full control over your data and infrastructure? Install and run Plane on your own servers. Follow our detailed [deployment guides](https://developers.plane.so/self-hosting/overview) to get started.
|
||||||
|
|
||||||
| Installation methods | Docs link |
|
| Installation methods | Docs link |
|
||||||
@@ -62,22 +62,22 @@ Prefer full control over your data and infrastructure? Install and run Plane on
|
|||||||
|
|
||||||
## 🌟 Features
|
## 🌟 Features
|
||||||
|
|
||||||
- **Issues**
|
- **Issues**
|
||||||
Efficiently create and manage tasks with a robust rich text editor that supports file uploads. Enhance organization and tracking by adding sub-properties and referencing related issues.
|
Efficiently create and manage tasks with a robust rich text editor that supports file uploads. Enhance organization and tracking by adding sub-properties and referencing related issues.
|
||||||
|
|
||||||
- **Cycles**
|
- **Cycles**
|
||||||
Maintain your team’s momentum with Cycles. Track progress effortlessly using burn-down charts and other insightful tools.
|
Maintain your team’s momentum with Cycles. Track progress effortlessly using burn-down charts and other insightful tools.
|
||||||
|
|
||||||
- **Modules**
|
- **Modules**
|
||||||
Simplify complex projects by dividing them into smaller, manageable modules.
|
Simplify complex projects by dividing them into smaller, manageable modules.
|
||||||
|
|
||||||
- **Views**
|
- **Views**
|
||||||
Customize your workflow by creating filters to display only the most relevant issues. Save and share these views with ease.
|
Customize your workflow by creating filters to display only the most relevant issues. Save and share these views with ease.
|
||||||
|
|
||||||
- **Pages**
|
- **Pages**
|
||||||
Capture and organize ideas using Plane Pages, complete with AI capabilities and a rich text editor. Format text, insert images, add hyperlinks, or convert your notes into actionable items.
|
Capture and organize ideas using Plane Pages, complete with AI capabilities and a rich text editor. Format text, insert images, add hyperlinks, or convert your notes into actionable items.
|
||||||
|
|
||||||
- **Analytics**
|
- **Analytics**
|
||||||
Access real-time insights across all your Plane data. Visualize trends, remove blockers, and keep your projects moving forward.
|
Access real-time insights across all your Plane data. Visualize trends, remove blockers, and keep your projects moving forward.
|
||||||
|
|
||||||
- **Drive** (_coming soon_): The drive helps you share documents, images, videos, or any other files that make sense to you or your team and align on the problem/solution.
|
- **Drive** (_coming soon_): The drive helps you share documents, images, videos, or any other files that make sense to you or your team and align on the problem/solution.
|
||||||
@@ -85,38 +85,7 @@ Access real-time insights across all your Plane data. Visualize trends, remove b
|
|||||||
|
|
||||||
## 🛠️ Local development
|
## 🛠️ Local development
|
||||||
|
|
||||||
### Pre-requisites
|
See [CONTRIBUTING](./CONTRIBUTING.md)
|
||||||
- Ensure Docker Engine is installed and running.
|
|
||||||
|
|
||||||
### Development setup
|
|
||||||
Setting up your local environment is simple and straightforward. Follow these steps to get started:
|
|
||||||
|
|
||||||
1. Clone the repository:
|
|
||||||
```
|
|
||||||
git clone https://github.com/makeplane/plane.git
|
|
||||||
```
|
|
||||||
2. Navigate to the project folder:
|
|
||||||
```
|
|
||||||
cd plane
|
|
||||||
```
|
|
||||||
3. Create a new branch for your feature or fix:
|
|
||||||
```
|
|
||||||
git checkout -b <feature-branch-name>
|
|
||||||
```
|
|
||||||
4. Run the setup script in the terminal:
|
|
||||||
```
|
|
||||||
./setup.sh
|
|
||||||
```
|
|
||||||
5. Open the project in an IDE such as VS Code.
|
|
||||||
|
|
||||||
6. Review the `.env` files in the relevant folders. Refer to [Environment Setup](./ENV_SETUP.md) for details on the environment variables used.
|
|
||||||
|
|
||||||
7. Start the services using Docker:
|
|
||||||
```
|
|
||||||
docker compose -f docker-compose-local.yml up -d
|
|
||||||
```
|
|
||||||
|
|
||||||
That’s it! You’re all set to begin coding. Remember to refresh your browser if changes don’t auto-reload. Happy contributing! 🎉
|
|
||||||
|
|
||||||
## ⚙️ Built with
|
## ⚙️ Built with
|
||||||
[](https://nextjs.org/)
|
[](https://nextjs.org/)
|
||||||
@@ -194,7 +163,7 @@ Feel free to ask questions, report bugs, participate in discussions, share ideas
|
|||||||
|
|
||||||
If you discover a security vulnerability in Plane, please report it responsibly instead of opening a public issue. We take all legitimate reports seriously and will investigate them promptly. See [Security policy](https://github.com/makeplane/plane/blob/master/SECURITY.md) for more info.
|
If you discover a security vulnerability in Plane, please report it responsibly instead of opening a public issue. We take all legitimate reports seriously and will investigate them promptly. See [Security policy](https://github.com/makeplane/plane/blob/master/SECURITY.md) for more info.
|
||||||
|
|
||||||
To disclose any security issues, please email us at security@plane.so.
|
To disclose any security issues, please email us at security@plane.so.
|
||||||
|
|
||||||
## 🤝 Contributing
|
## 🤝 Contributing
|
||||||
|
|
||||||
@@ -219,4 +188,4 @@ Please read [CONTRIBUTING.md](https://github.com/makeplane/plane/blob/master/CON
|
|||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
This project is licensed under the [GNU Affero General Public License v3.0](https://github.com/makeplane/plane/blob/master/LICENSE.txt).
|
This project is licensed under the [GNU Affero General Public License v3.0](https://github.com/makeplane/plane/blob/master/LICENSE.txt).
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
NEXT_PUBLIC_API_BASE_URL=""
|
NEXT_PUBLIC_API_BASE_URL="http://localhost:8000"
|
||||||
|
|
||||||
|
NEXT_PUBLIC_WEB_BASE_URL="http://localhost:3000"
|
||||||
|
|
||||||
|
NEXT_PUBLIC_ADMIN_BASE_URL="http://localhost:3001"
|
||||||
NEXT_PUBLIC_ADMIN_BASE_PATH="/god-mode"
|
NEXT_PUBLIC_ADMIN_BASE_PATH="/god-mode"
|
||||||
NEXT_PUBLIC_WEB_BASE_URL=""
|
|
||||||
|
NEXT_PUBLIC_SPACE_BASE_URL="http://localhost:3002"
|
||||||
|
NEXT_PUBLIC_SPACE_BASE_PATH="/spaces"
|
||||||
|
|
||||||
|
NEXT_PUBLIC_LIVE_BASE_URL="http://localhost:3100"
|
||||||
|
NEXT_PUBLIC_LIVE_BASE_PATH="/live"
|
||||||
|
|||||||
@@ -17,10 +17,10 @@
|
|||||||
"@headlessui/react": "^1.7.19",
|
"@headlessui/react": "^1.7.19",
|
||||||
"@plane/constants": "*",
|
"@plane/constants": "*",
|
||||||
"@plane/hooks": "*",
|
"@plane/hooks": "*",
|
||||||
|
"@plane/services": "*",
|
||||||
"@plane/types": "*",
|
"@plane/types": "*",
|
||||||
"@plane/ui": "*",
|
"@plane/ui": "*",
|
||||||
"@plane/utils": "*",
|
"@plane/utils": "*",
|
||||||
"@plane/services": "*",
|
|
||||||
"@tailwindcss/typography": "^0.5.9",
|
"@tailwindcss/typography": "^0.5.9",
|
||||||
"@types/lodash": "^4.17.0",
|
"@types/lodash": "^4.17.0",
|
||||||
"autoprefixer": "10.4.14",
|
"autoprefixer": "10.4.14",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Backend
|
# Backend
|
||||||
# Debug value for api server use it as 0 for production use
|
# Debug value for api server use it as 0 for production use
|
||||||
DEBUG=0
|
DEBUG=0
|
||||||
CORS_ALLOWED_ORIGINS="http://localhost"
|
CORS_ALLOWED_ORIGINS="http://localhost:3000,http://localhost:3001,http://localhost:3002,http://localhost:3100"
|
||||||
|
|
||||||
# Database Settings
|
# Database Settings
|
||||||
POSTGRES_USER="plane"
|
POSTGRES_USER="plane"
|
||||||
@@ -27,7 +27,7 @@ RABBITMQ_VHOST="plane"
|
|||||||
AWS_REGION=""
|
AWS_REGION=""
|
||||||
AWS_ACCESS_KEY_ID="access-key"
|
AWS_ACCESS_KEY_ID="access-key"
|
||||||
AWS_SECRET_ACCESS_KEY="secret-key"
|
AWS_SECRET_ACCESS_KEY="secret-key"
|
||||||
AWS_S3_ENDPOINT_URL="http://plane-minio:9000"
|
AWS_S3_ENDPOINT_URL="http://localhost:9000"
|
||||||
# Changing this requires change in the nginx.conf for uploads if using minio setup
|
# Changing this requires change in the nginx.conf for uploads if using minio setup
|
||||||
AWS_S3_BUCKET_NAME="uploads"
|
AWS_S3_BUCKET_NAME="uploads"
|
||||||
# Maximum file upload limit
|
# Maximum file upload limit
|
||||||
@@ -37,22 +37,31 @@ FILE_SIZE_LIMIT=5242880
|
|||||||
DOCKERIZED=1 # deprecated
|
DOCKERIZED=1 # deprecated
|
||||||
|
|
||||||
# set to 1 If using the pre-configured minio setup
|
# set to 1 If using the pre-configured minio setup
|
||||||
USE_MINIO=1
|
USE_MINIO=0
|
||||||
|
|
||||||
# Nginx Configuration
|
# Nginx Configuration
|
||||||
NGINX_PORT=80
|
NGINX_PORT=80
|
||||||
|
|
||||||
# Email redirections and minio domain settings
|
# Email redirections and minio domain settings
|
||||||
WEB_URL="http://localhost"
|
WEB_URL="http://localhost:8000"
|
||||||
|
|
||||||
# Gunicorn Workers
|
# Gunicorn Workers
|
||||||
GUNICORN_WORKERS=2
|
GUNICORN_WORKERS=2
|
||||||
|
|
||||||
# Base URLs
|
# Base URLs
|
||||||
ADMIN_BASE_URL=
|
ADMIN_BASE_URL="http://localhost:3001"
|
||||||
SPACE_BASE_URL=
|
ADMIN_BASE_PATH="/god-mode"
|
||||||
APP_BASE_URL=
|
|
||||||
|
|
||||||
|
SPACE_BASE_URL="http://localhost:3002"
|
||||||
|
SPACE_BASE_PATH="/spaces"
|
||||||
|
|
||||||
|
APP_BASE_URL="http://localhost:3000"
|
||||||
|
APP_BASE_PATH=""
|
||||||
|
|
||||||
|
LIVE_BASE_URL="http://localhost:3100"
|
||||||
|
LIVE_BASE_PATH="/live"
|
||||||
|
|
||||||
|
LIVE_SERVER_SECRET_KEY="secret-key"
|
||||||
|
|
||||||
# Hard delete files after days
|
# Hard delete files after days
|
||||||
HARD_DELETE_AFTER_DAYS=60
|
HARD_DELETE_AFTER_DAYS=60
|
||||||
|
|||||||
@@ -14,17 +14,29 @@ def base_host(request: Request | HttpRequest, is_admin: bool = False, is_space:
|
|||||||
|
|
||||||
# Admin redirections
|
# Admin redirections
|
||||||
if is_admin:
|
if is_admin:
|
||||||
|
admin_base_path = getattr(settings, "ADMIN_BASE_PATH", "/god-mode/")
|
||||||
|
if not admin_base_path.startswith("/"):
|
||||||
|
admin_base_path = "/" + admin_base_path
|
||||||
|
if not admin_base_path.endswith("/"):
|
||||||
|
admin_base_path += "/"
|
||||||
|
|
||||||
if settings.ADMIN_BASE_URL:
|
if settings.ADMIN_BASE_URL:
|
||||||
return settings.ADMIN_BASE_URL
|
return settings.ADMIN_BASE_URL + admin_base_path
|
||||||
else:
|
else:
|
||||||
return base_origin + "/god-mode/"
|
return base_origin + admin_base_path
|
||||||
|
|
||||||
# Space redirections
|
# Space redirections
|
||||||
if is_space:
|
if is_space:
|
||||||
|
space_base_path = getattr(settings, "SPACE_BASE_PATH", "/spaces/")
|
||||||
|
if not space_base_path.startswith("/"):
|
||||||
|
space_base_path = "/" + space_base_path
|
||||||
|
if not space_base_path.endswith("/"):
|
||||||
|
space_base_path += "/"
|
||||||
|
|
||||||
if settings.SPACE_BASE_URL:
|
if settings.SPACE_BASE_URL:
|
||||||
return settings.SPACE_BASE_URL
|
return settings.SPACE_BASE_URL + space_base_path
|
||||||
else:
|
else:
|
||||||
return base_origin + "/spaces/"
|
return base_origin + space_base_path
|
||||||
|
|
||||||
# App Redirection
|
# App Redirection
|
||||||
if is_app:
|
if is_app:
|
||||||
|
|||||||
@@ -312,9 +312,13 @@ CSRF_FAILURE_VIEW = "plane.authentication.views.common.csrf_failure"
|
|||||||
|
|
||||||
# Base URLs
|
# Base URLs
|
||||||
ADMIN_BASE_URL = os.environ.get("ADMIN_BASE_URL", None)
|
ADMIN_BASE_URL = os.environ.get("ADMIN_BASE_URL", None)
|
||||||
|
ADMIN_BASE_PATH = os.environ.get("ADMIN_BASE_PATH", None)
|
||||||
SPACE_BASE_URL = os.environ.get("SPACE_BASE_URL", None)
|
SPACE_BASE_URL = os.environ.get("SPACE_BASE_URL", None)
|
||||||
|
SPACE_BASE_PATH = os.environ.get("SPACE_BASE_PATH", None)
|
||||||
APP_BASE_URL = os.environ.get("APP_BASE_URL")
|
APP_BASE_URL = os.environ.get("APP_BASE_URL")
|
||||||
|
APP_BASE_PATH = os.environ.get("APP_BASE_PATH", None)
|
||||||
LIVE_BASE_URL = os.environ.get("LIVE_BASE_URL")
|
LIVE_BASE_URL = os.environ.get("LIVE_BASE_URL")
|
||||||
|
LIVE_BASE_PATH = os.environ.get("LIVE_BASE_PATH")
|
||||||
WEB_URL = os.environ.get("WEB_URL")
|
WEB_URL = os.environ.get("WEB_URL")
|
||||||
|
|
||||||
HARD_DELETE_AFTER_DAYS = int(os.environ.get("HARD_DELETE_AFTER_DAYS", 60))
|
HARD_DELETE_AFTER_DAYS = int(os.environ.get("HARD_DELETE_AFTER_DAYS", 60))
|
||||||
|
|||||||
@@ -19,17 +19,29 @@ def base_host(request: Request | HttpRequest, is_admin: bool = False, is_space:
|
|||||||
|
|
||||||
# Admin redirections
|
# Admin redirections
|
||||||
if is_admin:
|
if is_admin:
|
||||||
|
admin_base_path = getattr(settings, "ADMIN_BASE_PATH", "/god-mode/")
|
||||||
|
if not admin_base_path.startswith("/"):
|
||||||
|
admin_base_path = "/" + admin_base_path
|
||||||
|
if not admin_base_path.endswith("/"):
|
||||||
|
admin_base_path += "/"
|
||||||
|
|
||||||
if settings.ADMIN_BASE_URL:
|
if settings.ADMIN_BASE_URL:
|
||||||
return settings.ADMIN_BASE_URL
|
return settings.ADMIN_BASE_URL + admin_base_path
|
||||||
else:
|
else:
|
||||||
return base_origin + "/god-mode/"
|
return base_origin + admin_base_path
|
||||||
|
|
||||||
# Space redirections
|
# Space redirections
|
||||||
if is_space:
|
if is_space:
|
||||||
|
space_base_path = getattr(settings, "SPACE_BASE_PATH", "/spaces/")
|
||||||
|
if not space_base_path.startswith("/"):
|
||||||
|
space_base_path = "/" + space_base_path
|
||||||
|
if not space_base_path.endswith("/"):
|
||||||
|
space_base_path += "/"
|
||||||
|
|
||||||
if settings.SPACE_BASE_URL:
|
if settings.SPACE_BASE_URL:
|
||||||
return settings.SPACE_BASE_URL
|
return settings.SPACE_BASE_URL + space_base_path
|
||||||
else:
|
else:
|
||||||
return base_origin + "/spaces/"
|
return base_origin + space_base_path
|
||||||
|
|
||||||
# App Redirection
|
# App Redirection
|
||||||
if is_app:
|
if is_app:
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ services:
|
|||||||
- dev_env
|
- dev_env
|
||||||
volumes:
|
volumes:
|
||||||
- redisdata:/data
|
- redisdata:/data
|
||||||
|
ports:
|
||||||
|
- "6379:6379"
|
||||||
|
|
||||||
plane-mq:
|
plane-mq:
|
||||||
image: rabbitmq:3.13.6-management-alpine
|
image: rabbitmq:3.13.6-management-alpine
|
||||||
@@ -26,7 +28,15 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- dev_env
|
- dev_env
|
||||||
command: server /export --console-address ":9090"
|
entrypoint: >
|
||||||
|
/bin/sh -c "
|
||||||
|
mkdir -p /export/${AWS_S3_BUCKET_NAME} &&
|
||||||
|
minio server /export --console-address ':9090' &
|
||||||
|
sleep 5 &&
|
||||||
|
mc alias set myminio http://localhost:9000 ${AWS_ACCESS_KEY_ID} ${AWS_SECRET_ACCESS_KEY} &&
|
||||||
|
mc mb myminio/${AWS_S3_BUCKET_NAME} -p || true
|
||||||
|
&& tail -f /dev/null
|
||||||
|
"
|
||||||
volumes:
|
volumes:
|
||||||
- uploads:/export
|
- uploads:/export
|
||||||
env_file:
|
env_file:
|
||||||
@@ -34,6 +44,9 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID}
|
MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID}
|
||||||
MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY}
|
MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY}
|
||||||
|
ports:
|
||||||
|
- "9000:9000"
|
||||||
|
- "9090:9090"
|
||||||
|
|
||||||
plane-db:
|
plane-db:
|
||||||
image: postgres:15.7-alpine
|
image: postgres:15.7-alpine
|
||||||
@@ -47,63 +60,65 @@ services:
|
|||||||
- .env
|
- .env
|
||||||
environment:
|
environment:
|
||||||
PGDATA: /var/lib/postgresql/data
|
PGDATA: /var/lib/postgresql/data
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
|
||||||
web:
|
# web:
|
||||||
build:
|
# build:
|
||||||
context: .
|
# context: .
|
||||||
dockerfile: ./web/Dockerfile.dev
|
# dockerfile: ./web/Dockerfile.dev
|
||||||
restart: unless-stopped
|
# restart: unless-stopped
|
||||||
networks:
|
# networks:
|
||||||
- dev_env
|
# - dev_env
|
||||||
volumes:
|
# volumes:
|
||||||
- ./web:/app/web
|
# - ./web:/app/web
|
||||||
env_file:
|
# env_file:
|
||||||
- ./web/.env
|
# - ./web/.env
|
||||||
depends_on:
|
# depends_on:
|
||||||
- api
|
# - api
|
||||||
- worker
|
# - worker
|
||||||
|
|
||||||
space:
|
# space:
|
||||||
build:
|
# build:
|
||||||
context: .
|
# context: .
|
||||||
dockerfile: ./space/Dockerfile.dev
|
# dockerfile: ./space/Dockerfile.dev
|
||||||
restart: unless-stopped
|
# restart: unless-stopped
|
||||||
networks:
|
# networks:
|
||||||
- dev_env
|
# - dev_env
|
||||||
volumes:
|
# volumes:
|
||||||
- ./space:/app/space
|
# - ./space:/app/space
|
||||||
depends_on:
|
# depends_on:
|
||||||
- api
|
# - api
|
||||||
- worker
|
# - worker
|
||||||
- web
|
# - web
|
||||||
|
|
||||||
admin:
|
# admin:
|
||||||
build:
|
# build:
|
||||||
context: .
|
# context: .
|
||||||
dockerfile: ./admin/Dockerfile.dev
|
# dockerfile: ./admin/Dockerfile.dev
|
||||||
restart: unless-stopped
|
# restart: unless-stopped
|
||||||
networks:
|
# networks:
|
||||||
- dev_env
|
# - dev_env
|
||||||
volumes:
|
# volumes:
|
||||||
- ./admin:/app/admin
|
# - ./admin:/app/admin
|
||||||
depends_on:
|
# depends_on:
|
||||||
- api
|
# - api
|
||||||
- worker
|
# - worker
|
||||||
- web
|
# - web
|
||||||
|
|
||||||
live:
|
# live:
|
||||||
build:
|
# build:
|
||||||
context: .
|
# context: .
|
||||||
dockerfile: ./live/Dockerfile.dev
|
# dockerfile: ./live/Dockerfile.dev
|
||||||
restart: unless-stopped
|
# restart: unless-stopped
|
||||||
networks:
|
# networks:
|
||||||
- dev_env
|
# - dev_env
|
||||||
volumes:
|
# volumes:
|
||||||
- ./live:/app/live
|
# - ./live:/app/live
|
||||||
depends_on:
|
# depends_on:
|
||||||
- api
|
# - api
|
||||||
- worker
|
# - worker
|
||||||
- web
|
# - web
|
||||||
|
|
||||||
api:
|
api:
|
||||||
build:
|
build:
|
||||||
@@ -122,6 +137,9 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- plane-db
|
- plane-db
|
||||||
- plane-redis
|
- plane-redis
|
||||||
|
- plane-mq
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
build:
|
build:
|
||||||
@@ -179,25 +197,25 @@ services:
|
|||||||
- plane-db
|
- plane-db
|
||||||
- plane-redis
|
- plane-redis
|
||||||
|
|
||||||
proxy:
|
# proxy:
|
||||||
build:
|
# build:
|
||||||
context: ./nginx
|
# context: ./nginx
|
||||||
dockerfile: Dockerfile.dev
|
# dockerfile: Dockerfile.dev
|
||||||
restart: unless-stopped
|
# restart: unless-stopped
|
||||||
networks:
|
# networks:
|
||||||
- dev_env
|
# - dev_env
|
||||||
ports:
|
# ports:
|
||||||
- ${NGINX_PORT}:80
|
# - ${NGINX_PORT}:80
|
||||||
env_file:
|
# env_file:
|
||||||
- .env
|
# - .env
|
||||||
environment:
|
# environment:
|
||||||
FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880}
|
# FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880}
|
||||||
BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads}
|
# BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads}
|
||||||
depends_on:
|
# depends_on:
|
||||||
- web
|
# - api
|
||||||
- api
|
# - web
|
||||||
- space
|
# - space
|
||||||
- admin
|
# - admin
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
redisdata:
|
redisdata:
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
API_BASE_URL="http://api:8000"
|
API_BASE_URL="http://localhost:8000"
|
||||||
|
|
||||||
|
WEB_BASE_URL="http://localhost:3000"
|
||||||
|
|
||||||
|
LIVE_BASE_URL="http://localhost:3100"
|
||||||
LIVE_BASE_PATH="/live"
|
LIVE_BASE_PATH="/live"
|
||||||
|
|
||||||
REDIS_URL="redis://plane-redis:6379/"
|
LIVE_SERVER_SECRET_KEY="secret-key"
|
||||||
|
|
||||||
# If you prefer not to provide a Redis URL, you can set the REDIS_HOST and REDIS_PORT environment variables instead.
|
# If you prefer not to provide a Redis URL, you can set the REDIS_HOST and REDIS_PORT environment variables instead.
|
||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
REDIS_HOST=plane-redis
|
REDIS_HOST=localhost
|
||||||
|
REDIS_URL="redis://localhost:6379/"
|
||||||
|
|||||||
@@ -17,15 +17,15 @@
|
|||||||
"lint:errors": "eslint src --ext .ts,.tsx --quiet"
|
"lint:errors": "eslint src --ext .ts,.tsx --quiet"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"reflect-metadata": "^0.2.2",
|
"express": "^4.21.2",
|
||||||
"express": "^4.21.2"
|
"reflect-metadata": "^0.2.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@plane/eslint-config": "*",
|
"@plane/eslint-config": "*",
|
||||||
"@types/express": "^4.17.21",
|
|
||||||
"@types/reflect-metadata": "^0.1.0",
|
|
||||||
"@plane/typescript-config": "*",
|
"@plane/typescript-config": "*",
|
||||||
|
"@types/express": "^4.17.21",
|
||||||
"@types/node": "^20.14.9",
|
"@types/node": "^20.14.9",
|
||||||
|
"@types/reflect-metadata": "^0.1.0",
|
||||||
"@types/ws": "^8.5.10",
|
"@types/ws": "^8.5.10",
|
||||||
"tsup": "8.4.0",
|
"tsup": "8.4.0",
|
||||||
"typescript": "^5.3.3"
|
"typescript": "^5.3.3"
|
||||||
|
|||||||
15
setup.sh
15
setup.sh
@@ -22,14 +22,14 @@ echo -e "${BOLD}Setting up your development environment...${NC}\n"
|
|||||||
copy_env_file() {
|
copy_env_file() {
|
||||||
local source=$1
|
local source=$1
|
||||||
local destination=$2
|
local destination=$2
|
||||||
|
|
||||||
if [ ! -f "$source" ]; then
|
if [ ! -f "$source" ]; then
|
||||||
echo -e "${RED}Error: Source file $source does not exist.${NC}"
|
echo -e "${RED}Error: Source file $source does not exist.${NC}"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp "$source" "$destination"
|
cp "$source" "$destination"
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo -e "${GREEN}✓${NC} Copied $destination"
|
echo -e "${GREEN}✓${NC} Copied $destination"
|
||||||
else
|
else
|
||||||
@@ -52,7 +52,7 @@ for service in "${services[@]}"; do
|
|||||||
if [ "$service" != "" ]; then
|
if [ "$service" != "" ]; then
|
||||||
prefix="./$service/"
|
prefix="./$service/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
copy_env_file "${prefix}.env.example" "${prefix}.env" || success=false
|
copy_env_file "${prefix}.env.example" "${prefix}.env" || success=false
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ done
|
|||||||
if [ -f "./apiserver/.env" ]; then
|
if [ -f "./apiserver/.env" ]; then
|
||||||
echo -e "\n${YELLOW}Generating Django SECRET_KEY...${NC}"
|
echo -e "\n${YELLOW}Generating Django SECRET_KEY...${NC}"
|
||||||
SECRET_KEY=$(tr -dc 'a-z0-9' < /dev/urandom | head -c50)
|
SECRET_KEY=$(tr -dc 'a-z0-9' < /dev/urandom | head -c50)
|
||||||
|
|
||||||
if [ -z "$SECRET_KEY" ]; then
|
if [ -z "$SECRET_KEY" ]; then
|
||||||
echo -e "${RED}Error: Failed to generate SECRET_KEY.${NC}"
|
echo -e "${RED}Error: Failed to generate SECRET_KEY.${NC}"
|
||||||
echo -e "${RED}Ensure 'tr' and 'head' commands are available on your system.${NC}"
|
echo -e "${RED}Ensure 'tr' and 'head' commands are available on your system.${NC}"
|
||||||
@@ -74,6 +74,11 @@ else
|
|||||||
success=false
|
success=false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Activate Yarn (version set in package.json)
|
||||||
|
corepack enable yarn || success=false
|
||||||
|
# Install Node dependencies
|
||||||
|
yarn install || success=false
|
||||||
|
|
||||||
# Summary
|
# Summary
|
||||||
echo -e "\n${YELLOW}Setup status:${NC}"
|
echo -e "\n${YELLOW}Setup status:${NC}"
|
||||||
if [ "$success" = true ]; then
|
if [ "$success" = true ]; then
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
NEXT_PUBLIC_API_BASE_URL=""
|
NEXT_PUBLIC_API_BASE_URL="http://localhost:8000"
|
||||||
NEXT_PUBLIC_WEB_BASE_URL=""
|
|
||||||
NEXT_PUBLIC_SPACE_BASE_PATH="/spaces"
|
NEXT_PUBLIC_WEB_BASE_URL="http://localhost:3000"
|
||||||
|
|
||||||
|
NEXT_PUBLIC_ADMIN_BASE_URL="http://localhost:3001"
|
||||||
|
NEXT_PUBLIC_ADMIN_BASE_PATH="/god-mode"
|
||||||
|
|
||||||
|
NEXT_PUBLIC_SPACE_BASE_URL="http://localhost:3002"
|
||||||
|
NEXT_PUBLIC_SPACE_BASE_PATH="/spaces"
|
||||||
|
|
||||||
|
NEXT_PUBLIC_LIVE_BASE_URL="http://localhost:3100"
|
||||||
|
NEXT_PUBLIC_LIVE_BASE_PATH="/live"
|
||||||
|
|||||||
@@ -22,9 +22,9 @@
|
|||||||
"@plane/constants": "*",
|
"@plane/constants": "*",
|
||||||
"@plane/editor": "*",
|
"@plane/editor": "*",
|
||||||
"@plane/i18n": "*",
|
"@plane/i18n": "*",
|
||||||
|
"@plane/services": "*",
|
||||||
"@plane/types": "*",
|
"@plane/types": "*",
|
||||||
"@plane/ui": "*",
|
"@plane/ui": "*",
|
||||||
"@plane/services": "*",
|
|
||||||
"axios": "^1.8.3",
|
"axios": "^1.8.3",
|
||||||
"clsx": "^2.0.0",
|
"clsx": "^2.0.0",
|
||||||
"date-fns": "^4.1.0",
|
"date-fns": "^4.1.0",
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
NEXT_PUBLIC_API_BASE_URL=""
|
NEXT_PUBLIC_API_BASE_URL="http://localhost:8000"
|
||||||
|
|
||||||
NEXT_PUBLIC_ADMIN_BASE_URL=""
|
NEXT_PUBLIC_WEB_BASE_URL="http://localhost:3000"
|
||||||
|
|
||||||
|
NEXT_PUBLIC_ADMIN_BASE_URL="http://localhost:3001"
|
||||||
NEXT_PUBLIC_ADMIN_BASE_PATH="/god-mode"
|
NEXT_PUBLIC_ADMIN_BASE_PATH="/god-mode"
|
||||||
|
|
||||||
NEXT_PUBLIC_SPACE_BASE_URL=""
|
NEXT_PUBLIC_SPACE_BASE_URL="http://localhost:3002"
|
||||||
NEXT_PUBLIC_SPACE_BASE_PATH="/spaces"
|
NEXT_PUBLIC_SPACE_BASE_PATH="/spaces"
|
||||||
|
|
||||||
NEXT_PUBLIC_LIVE_BASE_URL=""
|
NEXT_PUBLIC_LIVE_BASE_URL="http://localhost:3100"
|
||||||
NEXT_PUBLIC_LIVE_BASE_PATH="/live"
|
NEXT_PUBLIC_LIVE_BASE_PATH="/live"
|
||||||
|
|||||||
Reference in New Issue
Block a user