Skip to content

Commit d675e54

Browse files
feat(docker): add production compose file, update README (#11)
- Introduced a new `docker-compose.prod.yml` file for production configuration. - Updated README to reflect changes in volume management and service startup instructions. - Removed the setup_volumes.sh script as volume directories are now managed directly in the docker-compose files.
1 parent c80eb3b commit d675e54

5 files changed

Lines changed: 35 additions & 53 deletions

File tree

.github/workflows/code-quality.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ jobs:
9898
steps:
9999
- name: Checkout code
100100
uses: actions/checkout@v4
101-
- name: Create volume directories
102-
run: bash scripts/setup_volumes.sh
103101
- name: Copy .env file
104102
run: cp .env.example .env
105103
- name: Set up Docker Buildx

README.md

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,6 @@ 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-
./scripts/setup_volumes.sh
31-
```
32-
33-
This prevents volume mount errors that may occur if the directories don't exist.
34-
3525
### Create environment file
3626

3727
Create a `.env` file in the root directory of the project with your environment variables:
@@ -44,11 +34,19 @@ Then edit the `.env` file to set your specific configuration values.
4434

4535
### Starting the services
4636

37+
You can start the services in two ways, depending on your environment:
38+
39+
#### 1. Development
40+
4741
```bash
4842
docker compose up -d
4943
```
5044

51-
This will start all services in detached mode.
45+
#### 2. Production
46+
47+
```bash
48+
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
49+
```
5250

5351
### Building custom images
5452

@@ -138,11 +136,14 @@ docker compose down -v
138136

139137
## Data Persistence
140138

141-
All data is stored in local volumes under the `./volumes/` directory:
139+
Data for all services is persisted using Docker volumes. The storage location depends on the environment:
140+
141+
- **Development (default, using `docker-compose.yml`)**: Docker uses anonymous volumes for each service. These are managed by Docker and are not bound to any directory in your project. Data persists as long as the volume exists, but is not directly accessible from the project folder.
142142

143-
- `./volumes/n8n_data` - n8n data and workflows
144-
- `./volumes/opensearch-data` - OpenSearch data for Temporal
145-
- `./volumes/postgresql-data` - PostgreSQL database for Temporal
143+
- **Production (using `docker-compose.prod.yml`)**: Volumes are explicitly bound to host directories under `/data/` for persistent storage and easier backup/restore.
144+
145+
> **Note:**
146+
> - Removing volumes with `docker compose down -v` will delete all persisted data.
146147
147148
## Service Ports
148149

@@ -166,12 +167,6 @@ If you encounter any issues:
166167

167168
3. Make sure Docker has sufficient resources allocated
168169

169-
4. If you encounter volume mount errors (e.g., "failed to mount local volume ... no such file or directory"), run the setup script:
170-
```bash
171-
./scripts/setup_volumes.sh
172-
```
173-
This creates the necessary volume directories in the `./volumes/` folder.
174-
175170
## GitHub MCP Configuration
176171

177172
To use GitHub-related functions with Cursor's Machine Coding Protocol (MCP), you need to configure a GitHub Personal Access Token:

docker-compose.prod.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
volumes:
2+
n8n_data:
3+
driver: local
4+
driver_opts:
5+
type: none
6+
o: bind
7+
device: /data/n8n
8+
opensearch-data:
9+
driver: local
10+
driver_opts:
11+
type: none
12+
o: bind
13+
device: /data/opensearch
14+
postgresql-data:
15+
driver: local
16+
driver_opts:
17+
type: none
18+
o: bind
19+
device: /data/postgresql

docker-compose.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -129,23 +129,8 @@ services:
129129

130130
volumes:
131131
n8n_data:
132-
driver: local
133-
driver_opts:
134-
type: none
135-
o: bind
136-
device: ${PWD}/volumes/n8n_data
137132
opensearch-data:
138-
driver: local
139-
driver_opts:
140-
type: none
141-
o: bind
142-
device: ${PWD}/volumes/opensearch-data
143133
postgresql-data:
144-
driver: local
145-
driver_opts:
146-
type: none
147-
o: bind
148-
device: ${PWD}/volumes/postgresql-data
149134

150135
networks:
151136
app-network:

scripts/setup_volumes.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)