Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enterprise/enhancements #754

Merged
merged 102 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
70960b8
Gitignore pnpm lockfile in enterprise/frontend
nas-tabchiche Aug 22, 2024
5f6e19d
Remove FF_WHITE_LABEL feature flag
nas-tabchiche Aug 22, 2024
6173223
Localize client settings strings
nas-tabchiche Aug 22, 2024
103f040
Fix logo and favicon being overriden when editing client settings nam…
nas-tabchiche Aug 22, 2024
b43092d
chore: run prettier
nas-tabchiche Aug 22, 2024
47530f7
Remove unneeded update method
nas-tabchiche Aug 22, 2024
a02ddbc
Implement file upload MIME type validation
nas-tabchiche Aug 22, 2024
2ae718c
Simplify logo and favicon management
nas-tabchiche Aug 22, 2024
34ccaf9
Add image/vnd.microsoft.icon mimetype for favicon and logo upload
nas-tabchiche Aug 22, 2024
cd899ac
Componentize login greetings
nas-tabchiche Aug 22, 2024
759a673
Add svg mimetype
nas-tabchiche Aug 22, 2024
a41d07c
Localize logo and favicon help texts
nas-tabchiche Aug 22, 2024
baaefcb
Fix libmagic1 installation in Dockerfile
nas-tabchiche Aug 22, 2024
9b9f9d3
Merge branch 'main' into enterprise/enhancements
nas-tabchiche Aug 23, 2024
c7b8e40
Update Makefile
nas-tabchiche Aug 23, 2024
1c0ca54
Use Object.hasOwn instead of hasOwnProperty
nas-tabchiche Aug 23, 2024
6185bfc
Write manage.sh script
nas-tabchiche Aug 23, 2024
eeb58e0
Update enterprise backend README
nas-tabchiche Aug 23, 2024
6cb0d99
Simplify enterprise frontend dev
nas-tabchiche Aug 23, 2024
ce3cdf8
Merge branch 'main' into enterprise/enhancements
nas-tabchiche Aug 23, 2024
7420e92
update readme
ab-smith Aug 24, 2024
69698b2
Merge branch 'main' into enterprise/enhancements
nas-tabchiche Aug 26, 2024
636dc55
Use safeTranslate util to attempt translation of dynamic strings
nas-tabchiche Aug 26, 2024
8d2f1e9
Check if response has field
nas-tabchiche Aug 26, 2024
962b538
Write enterprise docker-compose files
nas-tabchiche Aug 26, 2024
c830546
Merge branch 'main' into enterprise/enhancements
nas-tabchiche Aug 27, 2024
f4181a4
Merge branch 'main' into enterprise/enhancements
nas-tabchiche Aug 27, 2024
b8602f7
Gitignore .meta files
nas-tabchiche Aug 27, 2024
9ef32c8
Update enterprise docker-compose-build
nas-tabchiche Aug 27, 2024
0dd959f
Allow specifying docker-compose file in docker-compose-build scripts
nas-tabchiche Aug 27, 2024
b2afd67
Build and push enterprise images
nas-tabchiche Aug 27, 2024
d624ca9
Merge branch 'main' into enterprise/enhancements
nas-tabchiche Sep 2, 2024
d79c828
Update backend deps
nas-tabchiche Sep 2, 2024
f18ad24
Add enterprise startup functional test
nas-tabchiche Sep 2, 2024
5c21b3b
Add enterprise startup docker-compose test
nas-tabchiche Sep 2, 2024
ed88018
Make sure pnpm is installed before running pre-build
nas-tabchiche Sep 2, 2024
bca5eae
Poetry run python manage.py scripts
nas-tabchiche Sep 2, 2024
211b085
Attempt to skip virtualenv creation
nas-tabchiche Sep 2, 2024
3d9d552
Add allauth extras in pyproject
nas-tabchiche Sep 2, 2024
6ed7afd
chore: Run poetry lock
nas-tabchiche Sep 2, 2024
e8563ab
Update upload artifacts path
nas-tabchiche Sep 3, 2024
b6b8fda
Fix typo
nas-tabchiche Sep 3, 2024
b2bcb38
Update enterprise artifact name
nas-tabchiche Sep 3, 2024
36fe34d
Fetch artifact in the right directory
nas-tabchiche Sep 3, 2024
39c51a8
Merge branch 'main' into enterprise/enhancements
nas-tabchiche Sep 4, 2024
cdae16c
Run startup tests in debug mode
nas-tabchiche Sep 4, 2024
a70a95b
Pin dependencies
nas-tabchiche Sep 4, 2024
27f561d
chore: Lock poetry dependencies
nas-tabchiche Sep 4, 2024
f90175c
Use poetry in community Dockerfile
nas-tabchiche Sep 4, 2024
697a722
chore: Run makemigrations
nas-tabchiche Sep 4, 2024
76fb7e6
Mirror community settings file
nas-tabchiche Sep 4, 2024
987fe09
chore: Re-generate package-lock.json file
nas-tabchiche Sep 4, 2024
0d29704
Stop relying on poetry to install enterprise_core in dockerized envir…
nas-tabchiche Sep 4, 2024
78edb74
Run docker compose startup test with poetry
nas-tabchiche Sep 4, 2024
800976a
Pipe falsy responses to stderr
nas-tabchiche Sep 4, 2024
ef5bbcb
write enterprise functional tests job
nas-tabchiche Sep 4, 2024
cd62335
Add mailhog service and browsers matrix
nas-tabchiche Sep 4, 2024
cef05f9
Fix build endpoint in enterprise
nas-tabchiche Sep 4, 2024
235bb58
Allow setting the BASE_DIR through env in enterprise
nas-tabchiche Sep 4, 2024
0fa276e
Fix enterprise functional tests artifact name
nas-tabchiche Sep 4, 2024
4a48bb6
Configure mailer properly in enterprise functional tests
nas-tabchiche Sep 4, 2024
5936a3f
Fetch client settings at the root layout
nas-tabchiche Sep 5, 2024
d1b7867
Store logo and favicon in local storage
nas-tabchiche Sep 10, 2024
3a4141d
Squash migrations
nas-tabchiche Sep 10, 2024
6e3daeb
Merge branch 'main' into enterprise/enhancements
nas-tabchiche Sep 10, 2024
292d34c
Include docker compose instructions in enterprise README
nas-tabchiche Sep 10, 2024
51ecd96
Remove obsolete version field
nas-tabchiche Sep 10, 2024
69dc36f
Merge branch 'main' into enterprise/enhancements
nas-tabchiche Sep 11, 2024
ad26ba4
Localize parent_domain field label
nas-tabchiche Sep 11, 2024
4aae05b
Manage DJANGO_SETTINGS_MODULE environment variable
nas-tabchiche Sep 11, 2024
a0f4ee4
Allow loading additional modules
nas-tabchiche Sep 12, 2024
a8d4251
Create enterprise build endpoint
nas-tabchiche Sep 12, 2024
44a4f7d
Update CISO Assistant build display
nas-tabchiche Sep 12, 2024
a97b395
Merge branch 'main' into enterprise/enhancements
nas-tabchiche Sep 17, 2024
fae7cb2
Don't run cleanup hook in CI
nas-tabchiche Sep 17, 2024
5c95353
Update poetry dependencies
nas-tabchiche Sep 17, 2024
f04fc3d
Remove obsolete license route
nas-tabchiche Sep 17, 2024
6304fa4
chore: Run poetry lock
nas-tabchiche Sep 17, 2024
0399171
Run regular startup tests using poetry
nas-tabchiche Sep 17, 2024
6966dcb
Update settings.py INSTALLED_APPS
nas-tabchiche Sep 17, 2024
6084f92
Update enterprise ModelForm
nas-tabchiche Sep 18, 2024
28c4b98
Merge branch 'main' into enterprise/enhancements
nas-tabchiche Sep 18, 2024
26b3970
Always run cleanup
nas-tabchiche Sep 18, 2024
72ec8bc
Only attempt to fetch logo or favicon if set in clientSettings
nas-tabchiche Sep 18, 2024
c4a24f0
Merge branch 'main' into enterprise/enhancements
nas-tabchiche Sep 18, 2024
824d58c
Update enterprise image builds
nas-tabchiche Sep 18, 2024
b61c6df
Update enterprise registry name
nas-tabchiche Sep 18, 2024
34de01f
squash
nas-tabchiche Sep 18, 2024
6297c03
Merge branch 'main' into enterprise/enhancements
nas-tabchiche Sep 19, 2024
c58a780
Remove unused isStableRelease input
nas-tabchiche Sep 19, 2024
c235a38
Update docker-build-and-push workflow
nas-tabchiche Sep 19, 2024
de98925
Fix logo not showing up when logo is unset in client settings
nas-tabchiche Sep 19, 2024
eea65b3
Merge branch 'main' into enterprise/enhancements
nas-tabchiche Sep 19, 2024
4b579dd
Remove unused imports
nas-tabchiche Sep 19, 2024
8eeef0f
Remove unused digestMessage function
nas-tabchiche Sep 19, 2024
03883ce
Merge branch 'main' into enterprise/enhancements
nas-tabchiche Sep 20, 2024
5fc0d92
Add internal route group in enterprise frontend
nas-tabchiche Sep 20, 2024
f4ff73c
Remove debug logs
nas-tabchiche Sep 20, 2024
6d18e9a
Internationalize client settings successful update message
nas-tabchiche Sep 20, 2024
2e4c452
fix/simplify docker compose for enterprise
eric-intuitem Sep 20, 2024
0ec5b54
Merge branch 'main' into enterprise/enhancements
nas-tabchiche Sep 23, 2024
9339b93
Run npm audit fix
nas-tabchiche Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 13 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ Here is an overview of CISO Assistant features and capabilities:

![overview](features.png)


CISO Assistant is developed and maintained by [intuitem](https://intuitem.com/), a French 🇫🇷 company specialized in Cyber Security, Cloud and Data/AI.

## Quick Start 🚀
Expand Down Expand Up @@ -87,11 +86,11 @@ and run the starter script
> If you're getting warnings or errors about image's platform not matching host platform, raise an issue with the details and we'll add it shortly after. You can also use `docker-compose-build.sh` instead (see below) to build for your specific architecture.

> [!CAUTION]
> Don't use the `main` branch code directly for production as it's the merge upstream and can have breaking changes during our developemnt. Either use the `tags` for stable versions or prebuilt images.
> Don't use the `main` branch code directly for production as it's the merge upstream and can have breaking changes during our developemnt. Either use the `tags` for stable versions or prebuilt images.

## End-user Documentation

Check out the online documentation on https://intuitem.gitbook.io/ciso-assistant.
Check out the online documentation on <https://intuitem.gitbook.io/ciso-assistant>.

## Supported frameworks 🐙

Expand Down Expand Up @@ -158,13 +157,12 @@ Check out the online documentation on https://intuitem.gitbook.io/ciso-assistant
3. ANSSI : Recommandations de configuration d'un système GNU/Linux 🇫🇷
4. PSSI-MCAS (Politique de sécurité des systèmes d’information pour les ministères chargés des affaires sociales) 🇫🇷
5. ANSSI : Recommandations pour la protection des systèmes d'information essentiels 🇫🇷
6. ANSSI : Recommandations de sécurité pour l'architecture d'un système de journalisation 🇫🇷
6. ANSSI : Recommandations de sécurité pour l'architecture d'un système de journalisation 🇫🇷
7. ANSSI : Recommandations de sécurité relatives à TLS 🇫🇷
8. New Zealand Information Security Manual (NZISM) 🇳🇿
<br/>
<br/>

> [!NOTE]
> `*` These frameworks require an extra manual step of getting the latest Excel sheet through their website as their license prevent direct usage.
> [!NOTE] > `*` These frameworks require an extra manual step of getting the latest Excel sheet through their website as their license prevent direct usage.

<br/>

Expand Down Expand Up @@ -364,7 +362,7 @@ python manage.py migrate
python manage.py createsuperuser
```

9. Run development server.
9. Run development server.

```sh
python manage.py runserver
Expand Down Expand Up @@ -398,7 +396,7 @@ npm install
npm run dev
```

4. Reach the frontend on http://localhost:5173
4. Reach the frontend on <http://localhost:5173>

> [!NOTE]
> Safari will not properly work in this setup, as it requires https for secure cookies. The simplest solution is to use Chrome or Firefox. An alternative is to use a caddy proxy. This is the solution used in docker-compose, so you can use it as an example.
Expand All @@ -407,13 +405,13 @@ npm run dev

All variables in the frontend have handy default values.

If you move the frontend on another host, you should set the following variable: PUBLIC_BACKEND_API_URL. Its default value is http://localhost:8000/api.
If you move the frontend on another host, you should set the following variable: PUBLIC_BACKEND_API_URL. Its default value is <http://localhost:8000/api>.

When you launch "node server" instead of "npm run dev", you need to set the ORIGIN variable to the same value as CISO_ASSISTANT_URL in the backend (e.g. http://localhost:3000).
When you launch "node server" instead of "npm run dev", you need to set the ORIGIN variable to the same value as CISO_ASSISTANT_URL in the backend (e.g. <http://localhost:3000>).

### Managing migrations

The migrations are tracked by version control, https://docs.djangoproject.com/en/4.2/topics/migrations/#version-control
The migrations are tracked by version control, <https://docs.djangoproject.com/en/4.2/topics/migrations/#version-control>

For the first version of the product, it is recommended to start from a clean migration.

Expand Down Expand Up @@ -449,7 +447,7 @@ The goal of the test harness is to prevent any regression, i.e. all the tests sh

## API and Swagger

- The API documentation is available in dev mode on the `<backend_endpoint>/api/schema/swagger/`, for instance http://127.0.0.1:8000/api/schema/swagger/
- The API documentation is available in dev mode on the `<backend_endpoint>/api/schema/swagger/`, for instance <http://127.0.0.1:8000/api/schema/swagger/>

To interact with it:

Expand Down Expand Up @@ -496,7 +494,7 @@ Set DJANGO_DEBUG=False for security reason.

## Security

Great care has been taken to follow security best practices. Please report any issue to [email protected].
Great care has been taken to follow security best practices. Please report any issue to <[email protected]>.

## License

Expand All @@ -506,6 +504,6 @@ All the files within the top-level "enterprise" directory are released under the

All the files outside the top-level "enterprise" directory are released under the [AGPLv3](https://choosealicense.com/licenses/agpl-3.0/).

See [LICENSE.txt](./LICENSE.txt) for details.
See [LICENSE.txt](./LICENSE.txt) for details. For more details about the commercial editions, you can reach us on <[email protected]>.

Unless otherwise noted, all files are © intuitem.
1 change: 1 addition & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ RUN apk add --no-cache bash yaml-cpp
RUN apk add --no-cache py3-cffi libc-dev libffi-dev gcc python3-dev glib pango cairo
RUN apk add --no-cache musl musl-utils musl-locales tzdata lang
RUN apk add --no-cache gettext fontconfig ttf-freefont font-noto terminus-font
RUN apk add --no-cache file-dev gcc

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Codacy found a medium Error Prone issue: Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version>

The issue identified by Hadolint is that the apk add command does not specify exact versions for the packages being installed. This can lead to inconsistencies and potential issues in the future if the packages are updated and introduce breaking changes. By pinning the package versions, you ensure that the same versions are used each time the Docker image is built, which helps in maintaining a stable and reproducible build environment.

Here's the single line change to fix the issue:

Suggested change
RUN apk add --no-cache file-dev gcc
RUN apk add --no-cache file-dev=5.39-r0 gcc=10.2.1_pre1-r3

This comment was generated by an experimental AI tool.


COPY . /code/
COPY startup.sh /code/
Expand Down
13 changes: 12 additions & 1 deletion backend/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ django-rest-knox = "4.2.0"
django-allauth = "0.63.5"
python3-saml = "^1.16"
requests = "^2.32"
python-magic = "^0.4.27"

[tool.poetry.group.dev.dependencies]
pytest-django = "4.8.0"
Expand Down
1 change: 1 addition & 0 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ django-allauth[socialaccount]==0.63.5
pre-commit==3.7.1
django-allauth[saml]==0.63.5
django-allauth==0.63.5
python-magic==0.4.27
1 change: 1 addition & 0 deletions enterprise/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ RUN apk add --no-cache bash yaml-cpp
RUN apk add --no-cache py3-cffi libc-dev libffi-dev gcc python3-dev glib pango cairo
RUN apk add --no-cache musl musl-utils musl-locales tzdata lang
RUN apk add --no-cache gettext fontconfig ttf-freefont font-noto terminus-font
RUN apk add --no-cache file-dev gcc

COPY backend /code/
COPY enterprise/backend /code/enterprise
Expand Down
18 changes: 5 additions & 13 deletions enterprise/backend/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
# Quick start (development)

1. Install the `enterprise_core` package
1. Make sure you are in the `enterprise/backend` directory

```bash
cd enterprise/backend
poetry install
```

2. Start the development server with the enterprise settings file
2. Install the `enterprise_core` package

```bash
python manage.py runserver --settings=enterprise_core.settings
poetry install
```

# Running a white label instance

This can be done by running the development server with the `FF_WHITE_LABEL` environment variable set to `true`.
3. Start the development server with the enterprise settings file

```bash
export FF_WHITE_LABEL=true
python manage.py runserver --settings=enterprise_core.settings
poetry run manage.sh runserver
```
15 changes: 13 additions & 2 deletions enterprise/backend/enterprise_core/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from enum import Enum
import os
from django.core.validators import FileExtensionValidator
from django.db import models
from iam.models import FolderMixin
from core.base_models import AbstractBaseModel
Expand All @@ -11,8 +12,18 @@ class FileField(Enum):
FAVICON = "favicon"

name = models.CharField(max_length=255, blank=True)
logo = models.ImageField(upload_to="client_logos", null=True, blank=True)
favicon = models.ImageField(upload_to="client_favicons", null=True, blank=True)
logo = models.ImageField(
upload_to="client_logos",
null=True,
blank=True,
validators=[FileExtensionValidator(["png", "jpeg", "jpg", "webp", "svg"])],
)
favicon = models.ImageField(
upload_to="client_favicons",
null=True,
blank=True,
validators=[FileExtensionValidator(["ico", "png", "jpeg", "jpg", "webp"])],
)

def __str__(self):
return self.name
Expand Down
8 changes: 1 addition & 7 deletions enterprise/backend/enterprise_core/serializers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from rest_framework import serializers
from core.serializers import BaseModelSerializer
from iam.models import Folder

Expand All @@ -23,10 +24,3 @@ class ClientSettingsReadSerializer(BaseModelSerializer):
class Meta:
model = ClientSettings
exclude = ["is_published", "folder"]

def update(self, instance, validated_data):
instance = self.instance
for key, value in validated_data.items():
setattr(instance, key, value)
instance.save()
return instance
11 changes: 4 additions & 7 deletions enterprise/backend/enterprise_core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,13 +387,10 @@ def set_ciso_assistant_url(_, __, event_dict):

MODULE_PATHS["serializers"] = ["enterprise_core.serializers"]

FEATURE_FLAGS["whiteLabel"] = os.environ.get("FF_WHITE_LABEL", "false") == "true"

if FEATURE_FLAGS["whiteLabel"]:
ROUTES["client-settings"] = {
"viewset": "enterprise_core.views.ClientSettingsViewSet",
"basename": "client-settings",
}
ROUTES["client-settings"] = {
"viewset": "enterprise_core.views.ClientSettingsViewSet",
"basename": "client-settings",
}

logger.info(
"Enterprise startup info", feature_flags=FEATURE_FLAGS, module_paths=MODULE_PATHS
Expand Down
17 changes: 17 additions & 0 deletions enterprise/backend/enterprise_core/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import mimetypes
import magic

import structlog
from core.views import BaseModelViewSet
Expand Down Expand Up @@ -86,6 +87,22 @@ def handle_file_upload(self, request, pk, field_name):

try:
settings = ClientSettings.objects.get(id=pk)
file = request.FILES["file"]
content_type = magic.Magic(mime=True).from_buffer(file.read())

if content_type not in [
"image/png",
"image/jpeg",
"image/webp",
"image/x-icon",
"image/vnd.microsoft.icon",
"image/svg+xml",
]:
return Response(
{field_name: "invalidFileType"},
status=status.HTTP_400_BAD_REQUEST,
)

setattr(settings, field_name, request.FILES["file"])
settings.save()
return Response(status=status.HTTP_200_OK)
Expand Down
6 changes: 6 additions & 0 deletions enterprise/backend/manage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

DJANGO_DIR=../../backend
ENTERPRISE_SETTINGS=enterprise_core.settings

python $DJANGO_DIR/manage.py $@ --settings=$ENTERPRISE_SETTINGS
1 change: 1 addition & 0 deletions enterprise/frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ symlink-from
coverage/**
.build
package.json
pnpm-lock.yaml
15 changes: 15 additions & 0 deletions enterprise/frontend/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
/tests/reports/*
/tests/results/*

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
8 changes: 8 additions & 0 deletions enterprise/frontend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
16 changes: 7 additions & 9 deletions enterprise/frontend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ FRONTEND_DIR := $(BUILD_DIR)/frontend
pre-build:
@mkdir -p $(BUILD_DIR)
@rsync -av --exclude=build/ --exclude=node_modules/ $(COMMUNITY_DIR) $(BUILD_DIR)
@rsync -avI $(ENTERPRISE_DIR) $(BUILD_DIR)
@rsync -avI --exclude=Makefile --exclude=Dockerfile --exclude=README.md $(ENTERPRISE_DIR) $(BUILD_DIR)
@$(PM) install --frozen-lockfile -C $(FRONTEND_DIR)

build-enterprise: pre-build
Expand All @@ -28,7 +28,7 @@ CHANGED_FILES =

# The rule to watch the filesystem for changes
watch:
@fswatch --batch-marker='EOF' -xn . ../../frontend | while read file event; do \
@fswatch --batch-marker='EOF' -xn ./src ../../frontend | while read file event; do \
if [ "$$file" = "EOF" ]; then \
$(MAKE) copy_files CHANGED_FILES="$$list"; \
list=(); \
Expand All @@ -54,13 +54,11 @@ copy_files:

dev:
@if [ -z "$$(ls -A $(FRONTEND_DIR))" ]; then \
echo "Please run make pre-build first."; \
exit 1; \
else \
$(PM) -C ${FRONTEND_DIR} run dev & \
$(MAKE) watch & \
wait; \
fi
$(MAKE) pre-build; \
fi; \
$(PM) -C ${FRONTEND_DIR} run dev & \
$(MAKE) watch & \
wait;

clean:
$(RM) $(ARTIFACTS)
17 changes: 1 addition & 16 deletions enterprise/frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@ OR
export PUBLIC_BACKEND_API_URL=http://127.0.0.1:8000/api
```

3. Move community and enterprise code to a single directory and install dependencies

```bash
make pre-build
```

4. Start a development server (ensure that the django app is running)
3. Start a development server (make sure that the backend is running)

```bash
make dev
Expand All @@ -32,12 +26,3 @@ To create a production version of your app:
```bash
make
```

# Running a white label instance

This can be done by running the development server with the `FF_WHITE_LABEL` environment variable set to `true`.

```bash
export FF_WHITE_LABEL=true
make dev
```
Loading
Loading