Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ dont-commit/

# Cursor rules
.cursorrules

# JetBrains IDEs
/.idea

# Docker
docker-compose.override.yaml
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,21 @@ To commit use `yarn commit`.

1. Install Docker, Docker compose and `ts-node` on your local machine
2. Follow the [First setup instructions](src/config/CONFIG.md#👶🏻-first-setup-instructions) to configure the Bundler before running it.
3. Run `docker compose up` and the server and all of it's dependencies should run in the current terminal session without throwing any errors.
3. (optional) Add `docker-compose.override.yaml` for Apple Silicon compatibility:
```yaml
services:
bundler:
platform: linux/arm64/v8
redis:
platform: linux/arm64/v8
mongo:
# see: https://www.mongodb.com/docs/manual/tutorial/install-mongodb-community-with-docker/#about-this-task
image: mongo:4.4
platform: linux/arm64/v8
rabbitmq:
platform: linux/arm64/v8
```
4. Run `docker compose up` and the server and all of it's dependencies should run in the current terminal session without throwing any errors.

Other useful commands:

Expand Down
18 changes: 12 additions & 6 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ services:
container_name: bundler
env_file: .env
ports:
- "0.0.0.0:3000:3000"
- "3000:3000"
links:
- redis
- mongo
- rabbitmq
depends_on:
mongo:
condition: service_started
Expand All @@ -35,7 +39,7 @@ services:
container_name: redis
command: ["redis-server", "--appendonly", "yes"]
ports:
- "0.0.0.0:6379:6379"
- "6379:6379"
volumes:
- redis-data:/data
restart: always
Expand All @@ -46,25 +50,27 @@ services:
retries: 5

mongo:
# see: https://www.mongodb.com/docs/manual/tutorial/install-mongodb-community-with-docker/#about-this-task
# image: mongo:4.4
image: mongo:latest
container_name: mongo
restart: always
ports:
- "0.0.0.0:27017:27017"
- "27017:27017"
volumes:
- mongo-data:/data/db

rabbitmq:
image: heidiks/rabbitmq-delayed-message-exchange:3.13.0-management
image: heidiks/rabbitmq-delayed-message-exchange:latest
container_name: "rabbitmq"
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 5s
timeout: 20s
retries: 5
ports:
- "0.0.0.0:5672:5672"
- "0.0.0.0:15672:15672"
- "5672:5672"
- "15672:15672"
volumes:
- rabbitmq_log:/var/log/rabbitmq
- rabbitmq_data:/var/lib/rabbitmq
4 changes: 3 additions & 1 deletion src/encrypt-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,7 @@ const passphrase = process.env.BUNDLER_CONFIG_PASSPHRASE;
if (passphrase !== undefined) {
encryptConfig(passphrase);
} else {
console.error("CONFIG_PASSPHRASE environment variable is not defined");
console.error(
"BUNDLER_CONFIG_PASSPHRASE environment variable is not defined",
);
}