Skip to content

Commit c80b677

Browse files
committed
Update Temporal and n8n configurations with latest versions and environment variables
- Update n8n from 1.22.0 to 1.89.2 and change working directory - Update Temporal from 1.20 to 1.20.5 and configure with environment variables - Replace Elasticsearch with OpenSearch for Temporal visibility - Add environment variables for n8n and database configurations - Improve container restart policies with unless-stopped - Update documentation with volume setup instructions and troubleshooting - Add .gitignore entries for mcp executable, config files and .cursor - Fix volume paths and opensearch port mapping
1 parent b64c345 commit c80b677

File tree

7 files changed

+69
-38
lines changed

7 files changed

+69
-38
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ yarn-error.log*
77
lerna-debug.log*
88
.pnpm-debug.log*
99

10+
# mcp executable
11+
mcp
12+
mcp-config.json
13+
.cursor/
14+
1015
# Diagnostic reports (https://nodejs.org/api/report.html)
1116
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
1217

Dockerfile.n8n

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM n8nio/n8n:1.22.0
1+
FROM n8nio/n8n:1.89.2
22

33
# Add custom environment variables
44
ENV N8N_PORT=5678 \
@@ -7,7 +7,7 @@ ENV N8N_PORT=5678 \
77
N8N_HEALTH_CHECK_ENDPOINT=true
88

99
# Create app directory
10-
WORKDIR /home/node/.n8n
10+
WORKDIR /home/node
1111

1212
# Add custom healthcheck using exec form
1313
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
@@ -17,4 +17,4 @@ HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
1717
USER node
1818

1919
# The entrypoint script is already defined in the base image
20-
# Don't override the CMD
20+
# Don't override the CMD

Dockerfile.temporal

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
FROM temporalio/auto-setup:1.20
1+
FROM temporalio/auto-setup:1.20.5
22

3-
# Set up environment variables for PostgreSQL and Elasticsearch
3+
# Set up environment variables for PostgreSQL and OpenSearch
44
ENV DB=postgresql \
55
DB_PORT=5432 \
6-
POSTGRES_USER=temporal \
7-
POSTGRES_PWD=temporal \
6+
POSTGRES_USER=${POSTGRES_USER} \
7+
POSTGRES_PWD=${POSTGRES_PASSWORD} \
88
POSTGRES_SEEDS=postgresql \
99
ENABLE_ES=true \
10-
ES_SEEDS=elasticsearch \
11-
ES_VERSION=v7
10+
ES_SEEDS=opensearch \
11+
ES_VERSION=v2
1212

1313
# Add custom healthcheck using exec form
14-
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
14+
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
1515
CMD ["/bin/sh", "-c", "temporal operator cluster health --address 0.0.0.0:7233 | grep -q SERVING || exit 1"]
1616

1717
# Explicitly set the user to the non-root 'temporal' user (already defined in the base image)
@@ -20,4 +20,4 @@ USER temporal
2020
# Expose the gRPC port
2121
EXPOSE 7233
2222

23-
# The entrypoint script is already defined in the base image
23+
# The entrypoint script is already defined in the base image

README.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The setup includes:
1111
- Temporal server
1212
- Temporal UI
1313
- PostgreSQL (database)
14-
- Elasticsearch (for visibility features)
14+
- OpenSearch (for visibility features)
1515

1616
## Custom Docker Images
1717

@@ -22,6 +22,17 @@ This project uses custom Docker images built from the following Dockerfiles:
2222

2323
## Usage
2424

25+
### Prepare volume directories
26+
27+
Before starting the services, run the setup script to create the necessary volume directories:
28+
29+
```bash
30+
chmod +x scripts/setup_volumes.sh
31+
./scripts/setup_volumes.sh
32+
```
33+
34+
This prevents volume mount errors that may occur if the directories don't exist.
35+
2536
### Starting the services
2637

2738
```bash
@@ -57,7 +68,7 @@ You should see containers for:
5768
- temporal
5869
- temporal-ui
5970
- temporal-postgresql
60-
- temporal-elasticsearch
71+
- opensearch
6172

6273
### Checking Service Health
6374

@@ -70,7 +81,7 @@ Use the provided script to verify that all services are accessible:
7081
This will check:
7182
- n8n health endpoint
7283
- Temporal UI web interface
73-
- Elasticsearch API
84+
- OpenSearch API
7485
- Temporal server gRPC port
7586
- PostgreSQL database connection
7687

@@ -79,14 +90,14 @@ Example output:
7990
Checking service availability...
8091
Checking n8n at http://localhost:5678/healthz... ACCESSIBLE ✅ (HTTP 200)
8192
Checking temporal-ui at http://localhost:8080... ACCESSIBLE ✅ (HTTP 200)
82-
Checking elasticsearch at http://localhost:9200... ACCESSIBLE ✅ (HTTP 200)
93+
Checking opensearch at http://localhost:9200... ACCESSIBLE ✅ (HTTP 200)
8394
Checking temporal at localhost:7233... ACCESSIBLE ✅
8495
Checking postgresql at localhost:5432... ACCESSIBLE ✅
8596
8697
Service URLs:
8798
- n8n: http://localhost:5678
8899
- Temporal UI: http://localhost:8080
89-
- Elasticsearch: http://localhost:9200
100+
- OpenSearch: http://localhost:9200
90101
```
91102

92103
### Accessing the services
@@ -121,7 +132,7 @@ docker compose down -v
121132
All data is stored in local volumes under the `./volumes/` directory:
122133

123134
- `./volumes/n8n_data` - n8n data and workflows
124-
- `./volumes/elasticsearch-data` - Elasticsearch data for Temporal
135+
- `./volumes/opensearch-data` - OpenSearch data for Temporal
125136
- `./volumes/postgresql-data` - PostgreSQL database for Temporal
126137

127138
## Service Ports
@@ -130,7 +141,7 @@ All data is stored in local volumes under the `./volumes/` directory:
130141
- Temporal server: 7233 (gRPC API, not HTTP)
131142
- Temporal UI: 8080
132143
- PostgreSQL: 5432
133-
- Elasticsearch: 9200
144+
- OpenSearch: 9200
134145

135146
## Troubleshooting
136147

@@ -143,4 +154,11 @@ If you encounter any issues:
143154
```
144155

145156
2. Ensure all required ports are available on your system
146-
3. Make sure Docker has sufficient resources allocated
157+
158+
3. Make sure Docker has sufficient resources allocated
159+
160+
4. If you encounter volume mount errors (e.g., "failed to mount local volume ... no such file or directory"), run the setup script:
161+
```bash
162+
./scripts/setup_volumes.sh
163+
```
164+
This creates the necessary volume directories in the `./volumes/` folder.

docker-compose.yml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,39 @@ services:
44
build:
55
context: .
66
dockerfile: Dockerfile.n8n
7+
restart: unless-stopped
78
ports:
89
- "5678:5678"
910
environment:
10-
- WEBHOOK_URL=http://localhost:5678/
11+
- WEBHOOK_URL=$N8N_WEBHOOK_URL
12+
- N8N_ENCRYPTION_KEY=$N8N_ENCRYPTION_KEY
1113
volumes:
1214
- n8n_data:/home/node/.n8n
1315
networks:
1416
- app-network
1517
user: node
1618

1719
# Temporal services
18-
elasticsearch:
19-
container_name: temporal-elasticsearch
20+
opensearch:
21+
container_name: opensearch
2022
image: opensearchproject/opensearch:2.5.0
23+
restart: unless-stopped
2124
environment:
2225
- discovery.type=single-node
2326
- bootstrap.memory_lock=true
2427
- "OPENSEARCH_JAVA_OPTS=-Xms256m -Xmx256m"
25-
- "DISABLE_SECURITY_PLUGIN=true"
28+
- "DISABLE_SECURITY_PLUGIN=${DISABLE_SECURITY_PLUGIN}"
2629
- "DISABLE_INSTALL_DEMO_CONFIG=true"
2730
ports:
28-
- 9200:9200
31+
- 9201:9200
2932
cap_add:
3033
- IPC_LOCK
3134
ulimits:
3235
memlock:
3336
soft: -1
3437
hard: -1
3538
volumes:
36-
- elasticsearch-data:/usr/share/opensearch/data
39+
- opensearch-data:/usr/share/opensearch/data
3740
networks:
3841
- app-network
3942
healthcheck:
@@ -45,10 +48,11 @@ services:
4548
postgresql:
4649
container_name: temporal-postgresql
4750
image: postgres:14
51+
restart: unless-stopped
4852
environment:
49-
POSTGRES_USER: temporal
50-
POSTGRES_PASSWORD: temporal
51-
POSTGRES_DB: temporal
53+
POSTGRES_USER: ${POSTGRES_USER}
54+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
55+
POSTGRES_DB: ${POSTGRES_DB}
5256
ports:
5357
- 5432:5432
5458
volumes:
@@ -57,7 +61,7 @@ services:
5761
- app-network
5862
user: postgres
5963
healthcheck:
60-
test: ["CMD-SHELL", "pg_isready -U temporal"]
64+
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
6165
interval: 5s
6266
timeout: 5s
6367
retries: 5
@@ -68,11 +72,14 @@ services:
6872
build:
6973
context: .
7074
dockerfile: Dockerfile.temporal
75+
restart: unless-stopped
7176
depends_on:
7277
postgresql:
7378
condition: service_healthy
74-
elasticsearch:
79+
opensearch:
7580
condition: service_healthy
81+
environment:
82+
- ES_SEEDS=opensearch
7683
ports:
7784
- 7233:7233
7885
networks:
@@ -82,9 +89,10 @@ services:
8289
temporal-ui:
8390
container_name: temporal-ui
8491
image: temporalio/ui:2.10.3
92+
restart: unless-stopped
8593
depends_on:
8694
temporal:
87-
condition: service_started
95+
condition: service_healthy
8896
environment:
8997
- TEMPORAL_ADDRESS=temporal:7233
9098
- TEMPORAL_PERMIT_WRITE_API=true
@@ -100,12 +108,12 @@ volumes:
100108
type: none
101109
o: bind
102110
device: ${PWD}/volumes/n8n_data
103-
elasticsearch-data:
111+
opensearch-data:
104112
driver: local
105113
driver_opts:
106114
type: none
107115
o: bind
108-
device: ${PWD}/volumes/elasticsearch-data
116+
device: ${PWD}/volumes/opensearch-data
109117
postgresql-data:
110118
driver: local
111119
driver_opts:
@@ -115,4 +123,4 @@ volumes:
115123

116124
networks:
117125
app-network:
118-
driver: bridge
126+
driver: bridge

scripts/check_services.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ check_http_service "n8n" "http://localhost:5678/healthz"
2828
# Check temporal-ui
2929
check_http_service "temporal-ui" "http://localhost:8080"
3030

31-
# Check elasticsearch
32-
check_http_service "elasticsearch" "http://localhost:9200"
31+
# Check opensearch
32+
check_http_service "opensearch" "http://localhost:9200"
3333

3434
# Check temporal service
3535
echo -n "Checking temporal at localhost:7233... "
@@ -50,4 +50,4 @@ fi
5050
echo -e "\nService URLs:"
5151
echo "- n8n: http://localhost:5678"
5252
echo "- Temporal UI: http://localhost:8080"
53-
echo "- Elasticsearch: http://localhost:9200"
53+
echo "- OpenSearch: http://localhost:9200"

scripts/setup_volumes.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Create volume directories for Docker Compose
44
echo "Setting up volume directories..."
5-
mkdir -p volumes/elasticsearch-data
5+
mkdir -p volumes/opensearch-data
66
mkdir -p volumes/postgresql-data
77
mkdir -p volumes/n8n_data
88

0 commit comments

Comments
 (0)