Skip to content

Commit

Permalink
refactor(automation): Simplify docker compose files (#5657)
Browse files Browse the repository at this point in the history
* Remove redis cluster docker files

* Remove unused Docker Compose files

These Docker Compose files are no longer in use by the application. It is beneficial to maintain clarity and cleanliness of the repository by removing them.

* Update docker compose and environment files for development setup

The docker compose file for local development setup now utilizes environment variables for port numbers. This makes it easier for developers to use custom port numbers without modifying the docker-compose file directly. Moreover, a readme file was updated to provide instructions for setting up the local development environment. The name of the docker compose file was also changed for consistency.

* Move docker-compose.monitoring.yml to deployment directory

The docker-compose file specific for monitoring has been relocated from the development directory to the deployment directory. This reorganization reflects its purpose more accurately.

* Update docker/local/development/docker-compose.yml

Co-authored-by: Sokratis Vidros <SokratisVidros@users.noreply.github.com>

* Update docker/local/development/docker-compose.yml

Co-authored-by: Sokratis Vidros <SokratisVidros@users.noreply.github.com>

* Update docker/local/development/docker-compose.yml

Co-authored-by: Sokratis Vidros <SokratisVidros@users.noreply.github.com>

* Refactor and clean up Docker configuration files

This commit streamlines Docker configuration files by consolidating and removing redundant docker-compose.yml from specific subdirectories. Also, the README.md files have been updated to reflect the changes made to the .env file path and docker-compose command. Necessary information about running Docker in ARM only mode has been added to the enterprise Readme file.

---------

Co-authored-by: Sokratis Vidros <SokratisVidros@users.noreply.github.com>
  • Loading branch information
Cliftonz and SokratisVidros authored Jun 4, 2024
1 parent 9646b86 commit 9de2dcb
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 547 deletions.
5 changes: 5 additions & 0 deletions docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ HOST_NAME=http://localhost
NODE_ENV=local
MONGO_MAX_POOL_SIZE=500
MONGO_MIN_POOL_SIZE=100
DOCKER_MONGO_PORT=27017
# MONGO USER
MONGO_INITDB_ROOT_USERNAME=root
# MONGO PASSWORD
MONGO_INITDB_ROOT_PASSWORD=secret
MONGO_URL=mongodb://root:secret@mongodb:27017/novu-db?authSource=admin
REDIS_HOST=redis

DOCKER_REDIS_SERVICE_PORT=6379
REDIS_PASSWORD=
REDIS_CACHE_SERVICE_HOST=

Expand Down Expand Up @@ -60,3 +63,5 @@ SENTRY_DSN=
# change these values
NEW_RELIC_APP_NAME=
NEW_RELIC_LICENSE_KEY=

DOCKER_LOCALSTACK_PORT=4566
4 changes: 2 additions & 2 deletions docker/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ git clone https://github.com/novuhq/novu
cd novu/docker

# Copy the example env file
cp .env.example ./local/deployment/.env
cp .env.example ./local/.env

# Start Novu
docker-compose -f ./local/deployment/docker-compose.yml up
docker-compose -f ./local/docker-compose.yml up
```

Now visit [http://127.0.0.1:4200](http://127.0.0.1:4200) to start using Novu.
Expand Down
24 changes: 23 additions & 1 deletion docker/enterprise/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,38 @@ docker-compose -f ./docker-compose.enterprise.yml up

Now visit [http://127.0.0.1:4200](http://127.0.0.1:4200) to start using Novu.



## Secure Your Setup
Though we provide some example secrets for getting started, it's highly recommended NOT to deploy your Novu setup using the defaults provided.
Update the .env file with your own secrets, in particular, make sure you replace:
JWT_SECRET: A secret key used by the API to generate JWT tokens.

## Redis Configuration
## Alterations

### Redis Configuration
You can configure Redis TLS by adding the following variables to the .env file and specifying the needed properties:
REDIS_TLS={"servername":"localhost"}
REDIS_CACHE_SERVICE_TLS={"servername":"localhost"}

### Running ARM Only
In order to force each service to run in ARM only,
you need to add the following tag `platform: linux/arm64` to
each of the services in their respective configuration files.
To do this, go through each service listed in your completed configuration
and add the ```platform: linux/arm64``` line.
This will ensure your services are run in ARM only.
Ex:
```
redis:
platform: linux/arm64
image: 'redis:alpine'
container_name: redis
restart: unless-stopped
logging:
driver: 'none'
```

## Configuration
For simplicity, we made decisions that might not be optimal for production:
- The database is on the same machine as the servers.
Expand Down
15 changes: 0 additions & 15 deletions docker/local/Readme.md

This file was deleted.

185 changes: 0 additions & 185 deletions docker/local/deployment/docker-compose.yml

This file was deleted.

Loading

0 comments on commit 9de2dcb

Please sign in to comment.