refactor: create docker-stack workspace for deployment configs
Created dedicated workspace for Docker deployment configurations and scripts. Improves organization by grouping all deployment-related files together. ## New Structure - docker-stack/: Docker Compose files and deployment scripts - docker-compose-standalone.yaml - docker-compose-swarm.yml - docker-compose-debug.yml - deploy-standalone.sh - deploy-swarm.sh - README.md (deployment documentation) - package.json ## Changes - Moved all docker-compose YAML files to docker-stack/ - Moved deploy scripts to docker-stack/ - Updated VS Code workspace to include docker-stack - Updated documentation (README, CLAUDE.md) ## Deployment Workflow 1. Build: `cd web-app && ./build.sh 2.20.0` 2. Deploy: `cd docker-stack && ./deploy-standalone.sh 2.20.0` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|||||||
|
|
||||||
This is a multi-project repository containing:
|
This is a multi-project repository containing:
|
||||||
- **web-app/**: Next.js 14 utility bills tracking application
|
- **web-app/**: Next.js 14 utility bills tracking application
|
||||||
|
- **docker-stack/**: Docker Compose configurations and deployment scripts
|
||||||
- **housekeeping/**: Database backup and maintenance scripts
|
- **housekeeping/**: Database backup and maintenance scripts
|
||||||
|
|
||||||
Each project is self-contained with its own dependencies.
|
Each project is self-contained with its own dependencies.
|
||||||
@@ -30,10 +31,10 @@ All commands should be run from within the respective project directory.
|
|||||||
|
|
||||||
## Deployment Commands
|
## Deployment Commands
|
||||||
|
|
||||||
**Building Docker Image** (from web-app directory):
|
**Building Docker Image** (`cd web-app`):
|
||||||
- `cd web-app && ./build.sh <version>` - Build Docker image
|
- `./build.sh <version>` - Build Docker image
|
||||||
|
|
||||||
**Deploying** (from repository root):
|
**Deploying** (`cd docker-stack`):
|
||||||
- `./deploy-standalone.sh <version>` - Deploy with docker-compose (standalone)
|
- `./deploy-standalone.sh <version>` - Deploy with docker-compose (standalone)
|
||||||
- `./deploy-swarm.sh <version>` - Deploy with Docker Swarm
|
- `./deploy-swarm.sh <version>` - Deploy with Docker Swarm
|
||||||
|
|
||||||
|
|||||||
13
README.md
13
README.md
@@ -17,14 +17,15 @@ Each location record is marked with a user ID.
|
|||||||
|
|
||||||
All the actions user `withUser` to fetch user ID, which is then used in all the DB operations.
|
All the actions user `withUser` to fetch user ID, which is then used in all the DB operations.
|
||||||
|
|
||||||
# Monorepo Structure
|
# Repository Structure
|
||||||
|
|
||||||
This repository contains multiple independent projects:
|
This repository contains multiple independent projects:
|
||||||
|
|
||||||
- **web-app/**: Next.js application for tracking utility bills
|
- **web-app/**: Next.js application for tracking utility bills
|
||||||
|
- **docker-stack/**: Docker Compose configurations and deployment scripts
|
||||||
- **housekeeping/**: Database backup and maintenance scripts
|
- **housekeeping/**: Database backup and maintenance scripts
|
||||||
|
|
||||||
Each project is self-contained with its own dependencies and package.json.
|
Each project is self-contained with its own dependencies and configuration.
|
||||||
|
|
||||||
## Working with Projects
|
## Working with Projects
|
||||||
|
|
||||||
@@ -34,6 +35,10 @@ cd web-app
|
|||||||
npm install
|
npm install
|
||||||
npm run dev
|
npm run dev
|
||||||
|
|
||||||
|
# Deploy with Docker
|
||||||
|
cd docker-stack
|
||||||
|
./deploy-standalone.sh 2.20.0
|
||||||
|
|
||||||
# Housekeeping scripts
|
# Housekeeping scripts
|
||||||
cd housekeeping
|
cd housekeeping
|
||||||
./db-backup--standalone.sh
|
./db-backup--standalone.sh
|
||||||
@@ -128,9 +133,11 @@ The image will be stored in the local Docker instance.
|
|||||||
|
|
||||||
## Deploying Docker Service
|
## Deploying Docker Service
|
||||||
|
|
||||||
From the repository root:
|
From the `docker-stack/` directory:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
cd docker-stack
|
||||||
|
|
||||||
# Standalone deployment
|
# Standalone deployment
|
||||||
./deploy-standalone.sh 2.20.0
|
./deploy-standalone.sh 2.20.0
|
||||||
|
|
||||||
|
|||||||
46
docker-stack/README.md
Normal file
46
docker-stack/README.md
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# Docker Stack
|
||||||
|
|
||||||
|
Docker Compose configurations and deployment scripts for the Evidencija Režija application.
|
||||||
|
|
||||||
|
## Files
|
||||||
|
|
||||||
|
### Docker Compose Configurations
|
||||||
|
|
||||||
|
- `docker-compose-standalone.yaml` - Standalone deployment with docker-compose
|
||||||
|
- `docker-compose-swarm.yml` - Docker Swarm deployment
|
||||||
|
- `docker-compose-debug.yml` - Debug/development deployment
|
||||||
|
|
||||||
|
### Deployment Scripts
|
||||||
|
|
||||||
|
- `deploy-standalone.sh` - Deploy standalone configuration
|
||||||
|
- `deploy-swarm.sh` - Deploy swarm configuration
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Deploying Standalone
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd docker-stack
|
||||||
|
./deploy-standalone.sh 2.20.0
|
||||||
|
```
|
||||||
|
|
||||||
|
### Deploying to Swarm
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd docker-stack
|
||||||
|
./deploy-swarm.sh 2.20.0
|
||||||
|
```
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- Docker image must be built first: `cd ../web-app && ./build.sh 2.20.0`
|
||||||
|
- MongoDB data directory: `../mongo-volume/`
|
||||||
|
- MongoDB backup directory: `../mongo-backup/`
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
All compose files reference:
|
||||||
|
- Web app image: `utility-bills-tracker:${IMAGE_VERSION}`
|
||||||
|
- Volume mounts: `../web-app/etc/hosts/`
|
||||||
|
- MongoDB data: `../mongo-volume/`
|
||||||
|
- MongoDB backups: `../mongo-backup/`
|
||||||
10
docker-stack/package.json
Normal file
10
docker-stack/package.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"name": "docker-stack",
|
||||||
|
"version": "2.20.0",
|
||||||
|
"private": true,
|
||||||
|
"description": "Docker deployment configurations and scripts",
|
||||||
|
"scripts": {
|
||||||
|
"deploy:standalone": "./deploy-standalone.sh",
|
||||||
|
"deploy:swarm": "./deploy-swarm.sh"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,6 +4,10 @@
|
|||||||
"name": "🌐 web-app",
|
"name": "🌐 web-app",
|
||||||
"path": "web-app"
|
"path": "web-app"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "🐳 docker-stack",
|
||||||
|
"path": "docker-stack"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "🔧 housekeeping",
|
"name": "🔧 housekeeping",
|
||||||
"path": "housekeeping"
|
"path": "housekeeping"
|
||||||
|
|||||||
Reference in New Issue
Block a user